Does the regex module support named captured groups?

Juanjo Alvarez fake at fakeemail.com
Tue Sep 21 06:05:10 PDT 2010


In Python and C# you can define a regex like:

"Blabla_(? <year>\d{4}) _BLA

And then if you match that against a string like:

Blabla_1970_BLA

you can get a hash with "year" as key and 1970 as value. Can this be 
done with D regex module? Trying it throws a RegExpException with the 
message "*+?  not allowed in atom"


More information about the Digitalmars-d-learn mailing list