Created: 2012-03-20 11:32
Updated: 2014-02-06 13:19
License: other

Website / Report Issue / Source Code ( Build Status )


PIC is pattern matching system roughly based on Cobol Pictures. It serves as an alternative to Regular Expressions for common data format needs.


Here is a simply example.

    PIC['Z.99'].to_re  #=> /\d*\.\d\d/


Currently PIC is very much in a state of "design development". It will take some time to workout the best correlations between picture and regular expression. Suggestions and patches welcome!


Per the usual RubyGems way:

$ gem install pic

Reference Material

The following links help explain concept of Edited Pictures.


General Discussion

If you do not have specific issue to report but would still like to discuss this library, you can send a message to the Rubyworks Mailing List, or try to catch up with us via the #rubyworks IRC channel.

Submitting Patches

Sending a code snippet is fine for very small changes. But beyond a few lines of code, please use git via Github to submit pull requests. It is best to submit a dedicated feature branch, and tests are always much appreciated.

Copyright & License

PIC is copyrighted free software.

Copyright (c) 2011 Rubyworks (BSD-2-Clause Licensed)

PIC is freely redistributable and modifiable in accordance with the BSD-2-Clause license.

See LICENSE.txt for details.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more