| Clean Architecture Toolkit for .NET | |||||
|
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications. It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design. |
|
||||
|
| HOME | MODULE OVERVIEW | DEMO | CAT.EXTENSIONS | |
|||||
Code Reference
» Cat.String.Extensions Assembly » Cat.String.Extensions Namespace » StringExtensions Class
StringExtensions.CreateRegex(this string, RegexOptions) Method
Compiles a regular expression with a two-second matching timeout, so a pathological pattern can’t hang the caller.
public static System.Text.RegularExpressions.Regex CreateRegex(this string regexPattern, System.Text.RegularExpressions.RegexOptions options=System.Text.RegularExpressions.RegexOptions.None);
Parameters
regexPattern System.String
The regex pattern to compile.
options System.Text.RegularExpressions.RegexOptions
The options to compile the regex with.
Returns
System.Text.RegularExpressions.Regex
The compiled System.Text.RegularExpressions.Regex.
Exceptions
System.ArgumentException
Thrown when regexPattern isn’t a valid regex pattern.