[ nedit-Bugs-1760116 ] Negated escape sequences misinterpreted
in character class
Joerg Fischer
jf505 at gmx.de
Sat Sep 1 11:05:16 CEST 2007
Tony Balinski wrote:
> Quoting Joerg Fischer <jf505 at gmx.de>:
>
> > Tony Balinski wrote:
> >
> > > I don't think it would be too difficult to adjust the code to provide
> > > consistency (either Perl-like or as I suggest). But I think that work
> > > should be done.
> >
> > Yes, it should. Sorry, I write too much and forgot to summarize:
> >
> > 1. (?N ) grouping by default, meaning treat \n as special char by
> > never matching it unless \n is given explicitly. This implies
> > that dot, [^...], and all the escape sequences can't match \n.
> >
> > 2. (?n ) grouping, meaning drop NEdit's convention to treat \n
> > specially and do in effect a Perl-like matching of newlines. That
> > is, dot does not match \n, [^...] does match \n if it is not
> > listed, and escape sequences do what they stand for: \s, \y, \D,
> > \L, and \W match newlines, \S, \Y, \d, \l and \w do not.
> >
> > 3. For the sake of completeness, invent a (?s ) grouping named after
> > Perl's s(ingle line) modifier. This matches newlines like (?n )
> > and in addition forces dot to match \n, too.
>
> I'd be happy with that. Anyone else have an opinion?
Hmm, no further opinions after a month or so. Perhpaps this just
means there is no opposition which is a good sign?
Cheers,
Jörg
More information about the Develop
mailing list