Cobol-like Picture Pattern Matching
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
lib
pkg
var
.gitignore
.index
.ruby
.travis.yml
Assembly
Gemfile
HISTORY.md
LICENSE.txt
MANIFEST.txt
README.md

README.md

Website / Report Issue / Source Code ( Build Status )

PIC

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

Usage

Here is a simply example.

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

Status

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!

Installation

Per the usual RubyGems way:

$ gem install pic

Reference Material

The following links help explain concept of Edited Pictures.

Contributing

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.