Use fancy_regex
instead of regex
for full-regex support.
#51957
-
Select Topic AreaProduct Feedback BodyA lot of times I need to use "advanced" regex features, like backreferences or look-arounds, the problem is that the Rust crate that Github uses for code search (regex) doesn't and will never support such features. So I suggest having full regex support by using other crates. In this discussion, Burntsushi (one of Suggestion: Have an "advanced regex search option" which alerts that it may take a little bit longer, or have a "complex-regex detector" and automatically choose between Relevant to #8653 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Thanks for the suggestion. We aren't currently planning to implement this because regular expression features like this have expensive runtimes and that puts our service at risk of denial of service. |
Beta Was this translation helpful? Give feedback.
-
I have already run into the error "your search query was too expensive" with the existing regex engine. It seems there are already safeguards in place for expensive patterns. Would those guards not work the same for fancy_regex? |
Beta Was this translation helpful? Give feedback.
Thanks for the suggestion. We aren't currently planning to implement this because regular expression features like this have expensive runtimes and that puts our service at risk of denial of service.