From: Martin DeMello Date: 2002-12-02T08:25:25+09:00 Subject: [ANN] xregex-0.02 http://zem.novylen.net/ruby/index.html Extended Regular Expressions library. alpha but usable. Current feature: Named subexpressions. (?.var=pattern) to capture, \{var} to reference. Comes in useful when combining several regexps into a bigger one, since you don't have to worry about a new subgroup changing all the matchdata indices. Usage example: include XRegex #create a new xregexp: a = rx("(?.num=\\d+):(?.alpha=[\\w']+)") #match it against a string b = a.match("120:abc") #and the variables can be accessed in the old numeric style (if you #insist) puts b[1] #or by name puts b['num'] puts b.alpha martin