GNU bug report logs -
#64128
regexp parser zero-width assertion bugs
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
On 2023-06-17 13:07, Mattias Engdegård wrote:
> 17 juni 2023 kl. 20.44 skrev Stefan Monnier <monnier <at> iro.umontreal.ca>:
>
>> I think the behavior that makes most sense is to signal an error when
>> compiling the regexp.
>
> Clearly, but some behaviour needs to be preserved for compatibility.
> Regexps like "^*" aren't uncommon. Can it be generalised in a useful way?
>
doc/lispref/searching.texi says that "*" is treated as an ordinary
character if it is in a context where its special meaning makes no
sense, giving "*foo" as an example. If we break with this tradition by
making "\b*" an error instead of being equivalent to "\b\*", we should
update that part of the manual.
One possible way forward is to update doc/lispref/searching.texi to
specify what we want. Then we can modify the code to match the updated
documentation.
In my experience, modifying the doc is often the hard part, so I took a
crack at that in the draft proposed patch, which I have not installed.
Comments?
[0001-Document-that-b-etc-are-now-invalid-regexps.patch (text/x-patch, attachment)]
This bug report was last modified 2 years and 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.