Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiseni committed Mar 16, 2024
1 parent b7ded77 commit f0472ec
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ private static bool SqlLike(this string input, string pattern)
.Replace(@"\[", "[") // Unescape '[' as it's used for character classes/ranges
.Replace(@"\^", "^"); // Unescape '^' as it can be used for negation in character classes

// Step 4: Ensure the pattern matches the entire string
// Ensure the pattern matches the entire string
regexPattern = "^" + regexPattern + "$";
var regex = new Regex(regexPattern, RegexOptions.IgnoreCase);

return regex.IsMatch(input);
}

Expand Down

0 comments on commit f0472ec

Please sign in to comment.