Project

pic

0.0
No commit activity in last 3 years
No release in over 3 years
PIC is a pattern matching library, like regular expressions, based on Cobol edited pictures. It's advantage over regular expressions is it more concise syntax which geared specifically toward validation of user input.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0
 Project Readme

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.