Page MenuHomeFreeBSD

Allow -DNO_STRICT_ERE to restore historic regex behavior
ClosedPublic

Authored by sjg on Wed, May 8, 10:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 18, 8:40 PM
Unknown Object (File)
Sat, May 11, 6:56 PM
Unknown Object (File)
Fri, May 10, 8:07 PM
Unknown Object (File)
Fri, May 10, 3:21 PM
Unknown Object (File)
Fri, May 10, 7:32 AM
Unknown Object (File)
Fri, May 10, 5:30 AM
Unknown Object (File)
Fri, May 10, 5:29 AM
Unknown Object (File)
Fri, May 10, 1:44 AM
Subscribers

Details

Summary

Allow restoring the behavior of '{' as described in regex(3).
Ie. only treat it as start of bounds if followed by a digit.

If NO_STRICT_ERE is not defined, the behavior introduced by
commit a4a801688c909ef39cbcbc3488bc4fdbabd69d66 is retained,
otherwise the previous behavior is restored.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sjg requested review of this revision.Wed, May 8, 10:15 PM
lib/libc/regex/regcomp.c
910

It occurs to me that this is the BRE path, but it'd be good for the knob to be consistent across BREs and EREs- maybe just rename the knob to NO_STRICT_REGEX? I don't think I have any complaints otherwise.

Rename knob to NO_STRICT_REGEX

This revision was not accepted when it landed; it landed in state Needs Review.Fri, May 10, 1:31 AM
This revision was automatically updated to reflect the committed changes.