-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-System.Text.RegularExpressionshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
Milestone
Description
I have the following C# regular expression
var regex = new Regex(@"^*_.$");
string input = "THIS_LINE_HAS_MANY_UNDERSCORES_L";
string result = regex.Match(input).Groups[0].Value;
Console.WriteLine(result);
Even though to the best of my knowledge the regex is invalid (* has no element to match on), it outputs the following (which is really just the _.$ part):
_L
Is ^ treated as a character class by the .NET Regex engine?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-System.Text.RegularExpressionshelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged