sd icon indicating copy to clipboard operation
sd copied to clipboard

[Feature Request] Fallback to pcre2 using ripgrep

Open blueray453 opened this issue 5 years ago • 1 comments

VSCode July 2019 (version 1.37) release note says:

Thanks to some upstream work in ripgrep, you can now use these features without enabling a special setting. ripgrep will fall back to the PCRE2 engine automatically if the regex uses a feature that isn't supported by the Rust regex engine

I have been using ripgrep & sd extensively for last few days. As per my understanding, sd can't do somethings which sed can do for example Convert Case. We can overcome a lot of those stuff by using ripgrep and setting --engine auto . along with some other tweaks, for example:

extended replacement string syntax that you can enable by including PCRE2_SUBSTITUTE_EXTENDED with the matching options when calling pcre2_substitute().

And addressing some issues.

So, can we use modified version of ripgrep to fallback to pcre2.

blueray453 avatar Apr 08 '20 12:04 blueray453

@blueray453 I have looked into this as well a while back. As soon as the regex library supports this, I will gladly add support :)

chmln avatar Apr 10 '20 21:04 chmln