Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make RZ_REGEX_EXTENDED behave exactly like PCRE2 documents. #4884

Open
Rot127 opened this issue Feb 7, 2025 · 0 comments
Open

Make RZ_REGEX_EXTENDED behave exactly like PCRE2 documents. #4884

Rot127 opened this issue Feb 7, 2025 · 0 comments
Labels

Comments

@Rot127
Copy link
Member

Rot127 commented Feb 7, 2025

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

@Rot127 Rot127 added the RzUtil label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant