-
Notifications
You must be signed in to change notification settings - Fork 66
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
Unicode ligature pairs like "fi" and "ss" in a lookbehind, plus -i flag, throws a "Variable length lookbehind not implemented" error #336
Comments
I think something in Perl is getting confused in the regex parser, and this is not an ack-specific problem. Here are some tests I've tried.
|
It looks like the problem is that Thanks to @wolfsage for pointing me to the StackOverflow answer. |
So it looks like the fix is that ack needs to add |
interestingly this error comes and goes with version of Perl.
Perl 5.30 gives (With -E fails for Perl 5.6 - 5.8.x of course. Adding |
So for Perl version 5.12 or lesser, we do nothing; |
This End user workaround that @elias6 can use immediately for this edgecase is to wrap their RE on commandline with |
compare #222 #153 #262 #258 to see offered workarounds and conflicting feature requests |
Hmm... maybe it does have something to do with ligatures. I get the error when I run This is what I see when I run
|
@n1vux thanks for offering your workaround. I think my use case is complex enough that it is not worth figuring out how to use it. I have been just doing |
If text is intended to be matched as ASCII bytes only then applying the On the other hand, if there are instances where the file contents get decoded before matching against the regex, and thus unicode matching is expected to work, the |
Bill, thanks for pointing out the other Unicode-related tickets. It may be that Can't We Just.... add |
While we stand s(t)olidly on an assumption that Adding an This issue and the 4 that i mentioned up thread should ALL be tagged with the |
I am using ack 3.5.0.
If I run
echo 'BROWNFOX' | ack -i '(?<!fire)fox'
from my shell, I get this output:But strangely, if I run
echo 'BROWNFOX' | ack -i '(?<!ice)fox'
, I getBROWNFOX
as I would expect.It seems like I only get the error if the lookbehind begins with a lowercase or uppercase
f
, and has at least one character after it. I do not get the error if I don't use-i
.The text was updated successfully, but these errors were encountered: