Page MenuHomeFreeBSD

Allow -DNO_STRICT_ERE to restore historic regex behavior
ClosedPublic

Authored by sjg on May 8 2024, 10:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 18, 6:05 AM
Unknown Object (File)
Sep 28 2024, 2:48 PM
Unknown Object (File)
Sep 18 2024, 2:30 AM
Unknown Object (File)
Sep 16 2024, 1:20 AM
Unknown Object (File)
Aug 18 2024, 9:45 AM
Unknown Object (File)
Aug 4 2024, 8:19 AM
Unknown Object (File)
Aug 3 2024, 5:58 AM
Unknown Object (File)
Jul 30 2024, 1:42 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.May 8 2024, 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.May 10 2024, 1:31 AM
This revision was automatically updated to reflect the committed changes.