Support GeneratedRegex
Hi Joseph. You may already do this, but can LinqPad support .Net Regular Expression Source Generators?
https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-source-generators
I'm interested in the Regex side of things, ge.g
[GeneratedRegex("abc|def", RegexOptions.IgnoreCase, "en-US")]
private static partial Regex AbcOrDefGeneratedRegex();
private static void EvaluateText(string text)
{
if (AbcOrDefGeneratedRegex().IsMatch(text))
{
// Take action with matching text
}
}
3
votes
Dr JGriff
shared this idea
-
Matthias Vill commented
This may be possible to implement without full source generator support (which would really be awesome, too!) and would allow to easier experiment with parts of a regular csproj.