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

WHILEM: matched 65535 out of 0..65535 #20104

Closed
AnFunctionArray opened this issue Aug 17, 2022 · 5 comments
Closed

WHILEM: matched 65535 out of 0..65535 #20104

AnFunctionArray opened this issue Aug 17, 2022 · 5 comments

Comments

@AnFunctionArray
Copy link
Contributor

So I was wondering why it wasn't matching at a an obvious match - apparently I had reached the limit wow.

@AnFunctionArray
Copy link
Contributor Author

I don't know if it's a bug but it's an interesting corner case at least.

@AnFunctionArray
Copy link
Contributor Author

The obvious solution is to use recursion at the end like: (?<pattern>(something)*+(?&pattern)?+).

@demerphq
Copy link
Collaborator

Recently we merged a patch sequence that means that it should be trivial to replace all of these short integer counts with proper sized ones. @khwilliamson @hvds

@AnFunctionArray
Copy link
Contributor Author

@demerphq Can you clarify - I recently run into the same problem again.

@AnFunctionArray
Copy link
Contributor Author

Ok - I'm not sure but it looks like this solution works:

(?<pattern>(?&something)*+((?&something)(?&pattern))?+)

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

No branches or pull requests

2 participants