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"