Re: Using regex to "sort" its matches

2013-04-16 Thread Linden Krouse
On Tuesday, 16 April 2013 at 20:00:37 UTC, Dmitry Olshansky wrote: 16-Apr-2013 22:59, Linden Krouse пишет: 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

Using regex to "sort" its matches

2013-04-16 Thread Linden Krouse
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 resu