in reply to Re^4: Regular expression..
in thread Regular expression..

The same way ruby itself parses ruby.

Hard way is with http://docs.huihoo.com/ruby/ruby-man-1.4/yacc.html/BNF/YACC

The easy way is with a lint for ruby like nitpick