From: Brian Candler Date: 2012-02-17T02:53:21+09:00 Subject: Any parser *for* regular expressions? Is there some existing code (preferably ruby) which can take a regular expression and build a parse tree from it? e.g. I want to turn "^(foo|(bar|baz)*|qux)$" into something like this: / | \ | / | \ foo <*> qux | / \ bar baz or some equivalent representation of the regular expression itself. (The trouble is, when you google for 'ruby regular expression parser' you get all sorts of parsers written *using* regular expressions, not parsers *for* regular expressions!) Thanks, Brian. -- Posted via http://www.ruby-forum.com/.