"Andrej Mitrovic" <[email protected]> wrote in message 
news:[email protected]...
> Speaking of regex.. I see there are two enums in std.regex, email and
> url, which are regular expressions. Why not collect more of these
> common regexes? And we could pack them up in a struct to avoid
> polluting the local namespace. I think this might encourage the use of
> std.regex, since the average Joe wouldn't have to reach for the regex
> book whenever he's processing strings. E.g.:
>
> foreach(m; match("10abc20def30", regex(patterns.number))) //
> std.regex.patterns.number
> {
>    writefln("%s[%s]%s", m.pre, m.hit, m.post);
> }
>
> Just a passing thought..

I think that's a great idea.


Reply via email to