std.range.byLine
monarch_dodra via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Sep 12 07:16:05 PDT 2014
On Friday, 12 September 2014 at 13:25:22 UTC, Nordlöw wrote:
> On Thursday, 11 September 2014 at 22:39:40 UTC, H. S. Teoh via
> Digitalmars-d-learn wrote:
>> foreach (line; myInput.split(regex(`\n|\r\n|\r`)))
>
> Shouldn't you use
>
> foreach (line; myInput.split(regex("\n|\r\n|\r")))
>
> here?
Probably not, as (AFAIK) the splitter engine *itself* will *also*
escape the passed in characters. IE: It literally needs the
characters '\' and 'n'.
More information about the Digitalmars-d-learn
mailing list