Skip to content

Commit 3b156e7

Browse files
MetalDentmairaw
authored andcommitted
[RegularExpressions.Examples.ChangeDateFormats]: Update the regex with @ (#1613)
* [RegularExpressions.Examples.ChangeDateFormats]: Update the regex with @ Fixes #15011 * readd comma
1 parent 7f27b7e commit 3b156e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

snippets/csharp/VS_Snippets_CLR/RegularExpressions.Examples.ChangeDateFormats/cs/Example_ChangeDateFormats1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static string MDYToDMY(string input)
1818
{
1919
try {
2020
return Regex.Replace(input,
21-
"\\b(?<month>\\d{1,2})/(?<day>\\d{1,2})/(?<year>\\d{2,4})\\b",
21+
@"\b(?<month>\d{1,2})/(?<day>\d{1,2})/(?<year>\d{2,4})\b",
2222
"${day}-${month}-${year}", RegexOptions.None,
2323
TimeSpan.FromMilliseconds(150));
2424
}

0 commit comments

Comments
 (0)