re and newlines

Zoltan Lajos Kis kiszl@REDACTED
Sun Jan 10 20:46:46 CET 2010


Hello all,

Can I somehow convince re to treat _all_ kinds of newline characters 
just like ordinary ones?

1> re:run("\rabc", "(.+)(?=abc)").
{match,[{0,1},{0,1}]}
2> re:run("\nabc", "(.+)(?=abc)").
nomatch

I would like both of these (and all alike) to match. I see a {newline, 
NLSpec} option, but it does
not have an 'off' switch, does it?

Regards,
Zoltan.


More information about the erlang-questions mailing list