On Thursday, 11 September 2014 at 22:39:40 UTC, H. S. Teoh via Digitalmars-d-learn > Why not just use std.regex?

        foreach (line; myInput.split(regex(`\n|\r\n|\r`)))
        {
                ...
        }


T

I'll try the lazy variant of std.regex

        foreach (line; myInput.splitter(regex(`\n|\r\n|\r`)))
        {
                ...
        }

I wonder if this is compatible with a ctRegex aswell. I'll try later.

See also: http://dlang.org/phobos/std_regex.html#.splitter

Thx

Reply via email to