Re: [pcre-dev] Newline feature request -- matching metachara…

Top Page
Delete this message
Author: Sheri
Date:  
To: pcre-dev
Subject: Re: [pcre-dev] Newline feature request -- matching metacharacter?
Here's a revolutionary thought:

Make \R match whichever linebreak is in effect. So
if <lf> it would match \n,
if <cr> it would match \r,
if <crlf> it would match (?>\r\n),
if <anycrlf> it would match (?>\r\n|\n|\r),
if <any> it would match (?>\r\n|\n|\x0b|\f|\r|\x85)

Maybe this way it would be possible to continue to allow the newline
option to change between compile and exec and still have \R match (as
foolish users might expect) only the linebreaks in effect.

Regards,
Sheri