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
The following links help explain concept of Edited Pictures.
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.
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.