firasdib / Regex101

This repository is currently only used for issue tracking for www.regex101.com
3.24k stars 199 forks source link

Update .NET regex engine to .NET 7.0 #1939

Closed danmoseley closed 1 year ago

danmoseley commented 1 year ago

.NET 7 just was released. Could you please update to use it ?

https://dotnet.microsoft.com/en-us/download/dotnet/7.0

https://devblogs.microsoft.com/dotnet/regular-expression-improvements-in-dotnet-7/

firasdib commented 1 year ago

The website already uses .NET 7. Are there any features you feel are missing?

danmoseley commented 1 year ago

@firasdib nope -- just checking you had picked up the final GA bits as I worked on it and I couldn't find a version number anywhere. Sounds like you've done that already -- thanks!

Incidentally, .NET 7 adds a new engine one that doesn't support all features (eg, principally it doesn't support backtracking) but has tighter bounds on execution time. I wonder whether it might be interesting to offer that as another option in the UI? It's the exact same API, but passing RegexOptions.NonBacktracking. Offering it on regex101 would allow folks to play with patterns they intend to pass to that engine. If that might be interesting I could open an issue to track the suggestion. https://devblogs.microsoft.com/dotnet/regular-expression-improvements-in-dotnet-7/#backtracking-and-regexoptions-nonbacktracking

cc @stephentoub

Ernest314 commented 1 year ago

@danmoseley I would be interested in support for RegexOptions.NonBacktracking as well, +1 for that!

danmoseley commented 1 year ago

@Ernest314 great -do you want to open that suggestion? (I have a bias 🙂)

firasdib commented 1 year ago

Thanks for opening up the other issue, I will look into it.