Skip to content

Support for Keep out \K #853

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

Closed
Jafetlch opened this issue Apr 12, 2022 · 3 comments
Closed

Support for Keep out \K #853

Jafetlch opened this issue Apr 12, 2022 · 3 comments
Labels

Comments

@Jafetlch
Copy link

There is a method for this, without using lookbehind?

@BurntSushi
Copy link
Member

What? Please consider adding more detail. I have no eathly clue what you're talking about. Consider providing more detail and examples.

@lespea
Copy link

lespea commented Apr 13, 2022

I was curious what this was too and googling led me here: https://perldoc.perl.org/perlre#%5CK

There is a special form of this construct, called \K (available since Perl 5.10.0), which causes the regex engine to "keep" everything it had matched prior to the \K and not include it in $&. This effectively provides non-experimental variable-length lookbehind of any length.

@BurntSushi
Copy link
Member

@lespea Thanks!

Assuming this is a feature request, I'm going to close this, as this crate doesn't support look-around. (Beyond some simple cases for anchor/word-boundary assertions.)

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

3 participants