Pandatech.RegexBox
1.1.2
This NuGet package has been deprecated and is no longer maintained. Its functionality has been consolidated into the Pandatech.SharedKernel package. There are no known bugs — all existing features have simply been moved to a larger, more comprehensive package.
Please update your projects to reference the new package going forward.
dotnet add package Pandatech.RegexBox --version 1.1.2
NuGet\Install-Package Pandatech.RegexBox -Version 1.1.2
<PackageReference Include="Pandatech.RegexBox" Version="1.1.2" />
<PackageVersion Include="Pandatech.RegexBox" Version="1.1.2" />
<PackageReference Include="Pandatech.RegexBox" />
paket add Pandatech.RegexBox --version 1.1.2
#r "nuget: Pandatech.RegexBox, 1.1.2"
#addin nuget:?package=Pandatech.RegexBox&version=1.1.2
#tool nuget:?package=Pandatech.RegexBox&version=1.1.2
Pandatech.RegexBox
Introduction
Pandatech.RegexBox is a .NET library that provides a set of regular expressions for common data validation tasks. It includes regex patterns for validating email addresses, usernames, URLs, IP addresses (both IPv4 and IPv6), US Social Security Numbers, and Armenian Social Security Numbers.
Features
- Email Validation: You can use the
PandaValidator.IsEmail(string email)
method to check if a given string is a valid email address. - Username Validation: The library provides the
PandaValidator.IsUsername(string userName)
method to validate usernames according to a defined pattern. - URL Validation: You can validate URLs using the
PandaValidator.IsUri(string uri, bool allowWildcards, bool allowNonSecure)
method. It supports wildcards and secure/non-secure URLs. - IP Address Validation: The library offers methods to validate both IPv4 and IPv6 addresses using
PandaValidator.IsIpAddress(string ip, bool isIpv4)
. - US Social Security Number Validation: The
PandaValidator.IsUsSocialSecurityNumber(string number)
method allows you to check if a string matches the pattern for a US Social Security Number. - Armenian Social Security Number Validation: You can validate Armenian Social Security Numbers using
PandaValidator.IsArmenianSocialSecurityNumber(string socialCardNumber)
.
How to Use
Here's an example of how to use Pandatech.RegexBox for email validation:
using Pandatech.RegexBox;
string email = "example@email.com";
if (PandaValidator.IsEmail(email))
{
Console.WriteLine("Valid email address.");
}
else
{
Console.WriteLine("Invalid email address.");
}
Note
- The library is designed for easy integration into your .NET projects.
- The library has best performance and security practices in mind.
- This library has 100% code coverage.
- Will be ongoing updated and maintained.
License
PandaTech.RegexBox is licensed under the MIT License.
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. |
-
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.
Version | Downloads | Last updated |
---|
Structure change