I have started a Module I call REG (Regular Expression Generator) and
placed it in github (see below). The idea is to create REs by
called descriptive methods which generate the appropriate RE. For
example, to create a RE to match the word test in a string:

my $re_test = REG->string_begin()
                 ->optional_space()
                 ->ignore_case( 'test' )
                 ->optional_space()
                 ->string_end();

The reason for it is simple; just as you should have descriptive names
for your variables, descriptive names for RE components make them
easier to build and to understand.

https://github.com/shawnhcorey/REG

Known bugs:

1. It's not complete.

2. The test scripts are just skeletons and don't work.

3. The documentation sucks.


-- 
Don't stop where the ink does.
        Shawn

Reply via email to