From 4dc2b7255de0cc39c831fd7ea81e052d922619ff Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Wed, 21 Feb 2024 15:06:10 +1100 Subject: [PATCH] compile EnglishArticle regex (#1420) --- src/Humanizer/ArticlePrefixSort.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Humanizer/ArticlePrefixSort.cs b/src/Humanizer/ArticlePrefixSort.cs index e92fd8e33..209162b85 100644 --- a/src/Humanizer/ArticlePrefixSort.cs +++ b/src/Humanizer/ArticlePrefixSort.cs @@ -5,7 +5,7 @@ /// public static class EnglishArticle { - static Regex _regex = new("^((The)|(the)|(a)|(A)|(An)|(an))\\s\\w+"); + static Regex _regex = new("^((The)|(the)|(a)|(A)|(An)|(an))\\s\\w+", RegexOptions.Compiled); /// /// Removes the prefixed article and appends it to the same string.