Skip to content

Commit

Permalink
compile EnglishArticle regex (#1420)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Feb 21, 2024
1 parent daf7ea8 commit 4dc2b72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Humanizer/ArticlePrefixSort.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// </summary>
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);

/// <summary>
/// Removes the prefixed article and appends it to the same string.
Expand Down

0 comments on commit 4dc2b72

Please sign in to comment.