By bloid
via jroller.com
Published: Jan 05 2009 / 14:33
This little Ruby program makes it easier to experiment with regular expressions. The first bit sets up a hash with strings as the keys and regular expression patterns as the values. The next part loops until the input line matches "quit". Each time through, it compares the input line to each regular expression in turn.
Add your comment