-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
lookaround/lookbehind regex that used to work not working anymore #6265
Comments
The regex engine was changed to the one native to Go which doesnt |
Note that go has a regexp2 library that supports these, it should be a relatively simply patch to use that instead of the stdlib one to add support. I dont have much motivation for this, but PR is welcome. |
You can also use the custom processing to do your matching in python using the python regex engine, without needing any patches. |
Actually in your case you dont need the look behind at all. If the regex contains a single unnamed group the match will be just that groups contents. So you can use
|
correct regex would be |
Thanks for 65f8bb7. You're awesome and one of the best open source developers! |
Describe the bug
To Reproduce
Steps to reproduce the behavior:
echo "got: sha256-L8wivKxb5OWfbnU/7Rs6GzecDLOCxAsukoO2Qj7egfU=" | kitten hints --program @ --type regex --regex '(?<=got.....)sha256.{45}'
https://regex101.com/r/ieCHXq/1 shows that it should work with PCRE/2, if golang is chosen from the flavors then it fails so it looks like its not supported in go regexp :(
kitty 5b8b91b
The text was updated successfully, but these errors were encountered: