Using regex to "sort" its matches
Linden Krouse
ztaticnull at gmail.com
Tue Apr 16 11:59:50 PDT 2013
Is there a way to use the regex library to put matches of
different regexs or classes into different slices? For instance,
if I had the regular expressions "(?<=#)\w+\b" and "(?<=%)\w+\b",
could I use them to match a string at the same time and stop if
the first one is found and keep their results separate (as if the
regex was "(?<=#)\w+\b|(?<=%)\w+\b)" and gave a slice for
"(?<=#)\w+\b" and a different one for "(?<=%)\w+\b" ). I'm a
little new to regexs for the record.
More information about the Digitalmars-d-learn
mailing list