Make RZ_REGEX_EXTENDED
behave exactly like PCRE2 documents.
#4884
Labels
RZ_REGEX_EXTENDED
behave exactly like PCRE2 documents.
#4884
Is your feature request related to a problem? Please describe.
Make Rizin regex API behave exactly like PCRE2, except documented exceptions.
This is not necessarily a bug but a general problem.
Our regex legacy engine interpreted spaces when the
EXTENDED
flag was set. PCRE2 doesn't. It just ignores them (literal spaces,\s
is still interpreted as blank character).To not break everything (and fixing all the regex in code) the spaces are replaced with '\s' curretly.
Describe the solution you'd like
Make
RZ_REGEX_EXTENDED
behave like PCRE2 documentation, so people can refer to the PCRE2 documentation.Describe alternatives you've considered
Leave it like this and add warnings somewhere.
Additional context
https://github.com/rizinorg/rizin/blob/dev/librz/util/regex.c#L60-L67
The text was updated successfully, but these errors were encountered: