From: Rob Partington Date: 2003-08-27T06:08:56+09:00 Subject: Re: Specification of Ruby regex? [Posted and Cc'd] On Tue, 26 Aug 2003 21:18:24 +0900, Emmanuel Touzery wrote: > btw, since there is a thread about that, i wanted to ask: > does ruby support named matches (sorry i don't know the proper terminology)? No, but I patched it a couple of years ago to do so. http://frottage.org/rjp/ruby/revar.html > C# does it like this: > "(?\d{4})-(?\d{1,2})-(?\d{1,2})" > > matches "2002-4-6" > and then in my match groups i have "year", "month", "day". string = "text string for this" string =~ /(?[foo]st.*?) / puts "#{$foo}" # prints "string" It's nice, but not overly useful in most circumstances.