Regex split ignoore empty and whitespace
Ali Çehreli
acehreli at yahoo.com
Fri Feb 21 00:52:38 UTC 2020
On 2/20/20 4:46 PM, Ali Çehreli wrote:
> auto range = std.regex.splitter!(No.keepSeparators)(l,
> ctRegex!`[\s-\)\(\.]+`);
After realizing that No.keepSeparators is the default value anyway, I
tried 'split' and it worked the way you wanted. So, perhaps all you
needed was that extra '+' in the regex pattern:
std.regex.split(l, ctRegex!`[\s-\)\(\.]+`)
Ali
More information about the Digitalmars-d-learn
mailing list