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

incorrect match with repeated group #300

Open
faceprint opened this issue Jan 8, 2024 · 1 comment
Open

incorrect match with repeated group #300

faceprint opened this issue Jan 8, 2024 · 1 comment

Comments

@faceprint
Copy link

faceprint commented Jan 8, 2024

A regex with a repeated group and a lazy space character doesn't work like I expect. boost and the online regex demo tools behave as expected. Here's as simple an example as I could easily create:

regex: (([A-Z][a-z]+ *?){1,4}) g

The intent is to match 1 to 4 capitalized words in front of a word starting with g.

https://gcc.godbolt.org/z/v6KWrasYv

CTRE fails to match multiple capitalized words, and only matches the last one.

@hanickadot
Copy link
Owner

Thanks, will look into it. It will take a while as I'm currently swamped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants