Kaz.Operations.Text.RegularExpressions
1.1.0
Prefix Reserved
.NET 8.0
This package targets .NET 8.0. The package is compatible with this framework or higher.
.NET Framework 4.7.2
This package targets .NET Framework 4.7.2. The package is compatible with this framework or higher.
dotnet add package Kaz.Operations.Text.RegularExpressions --version 1.1.0
NuGet\Install-Package Kaz.Operations.Text.RegularExpressions -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Kaz.Operations.Text.RegularExpressions" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Kaz.Operations.Text.RegularExpressions" Version="1.1.0" />
<PackageReference Include="Kaz.Operations.Text.RegularExpressions" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Kaz.Operations.Text.RegularExpressions --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Kaz.Operations.Text.RegularExpressions, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Kaz.Operations.Text.RegularExpressions@1.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Kaz.Operations.Text.RegularExpressions&version=1.1.0
#tool nuget:?package=Kaz.Operations.Text.RegularExpressions&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Kaz.Operations.Text.RegularExpressions
About
This library extends the Kaz.Operations.Text possibilities by adding a fluent API builder for Regular Expressions. This library targets .NET 8 and .NET Framework 4.7.2.
Features
- Adds a fluent API builder for regular expressions, regular expressions groups and charsets.
How to use
using System;
using Kaz.Operations.Text.RegularExpressions;
class Program
{
static void Main(string[] args)
{
var builder = new RegexBuilder();
builder
.Start() // Start anchor
.Charset(() => new RegexCharset()
.AddRange('a', 'z')
.AddRange('A', 'Z')
.AddRange('0', '9')
.AddWord("._%+-")
).OneOrMore() // Quantifier
.Literal("@")
.Charset(() => new RegexCharset()
.AddRange('a', 'z')
.AddRange('A', 'Z')
.AddRange('0', '9')
.AddWord(".-")
).OneOrMore() // Quantifier
.Literal(".")
.Charset(() => new RegexCharset()
.AddRange('a', 'z')
.AddRange('A', 'Z')
).Repeat(2, 6) // Quantifier
.End(); // End anchor
var emailRegex = builder.Build(); // returns a new Regex instance
string testEmail = "bronsk1y@gmail.com";
bool isValid = emailRegex.IsMatch(testEmail); // true
}
}
Main Classes & Types
The main classes are:
RegexBuilderRegexGroupRegexCharset
The main types are:
GroupTypeUnicodeCategoryType
Licence
Kaz.Operations.Text.RegularExpressions is released as an open source project under the MIT Licence.
Feedback & Contributing
You can report a bug or contribute at the Github repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net472 is compatible. net48 was computed. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.7.2
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.