Extend.NET.Regex
2024.9.9.1414
dotnet add package Extend.NET.Regex --version 2024.9.9.1414
NuGet\Install-Package Extend.NET.Regex -Version 2024.9.9.1414
<PackageReference Include="Extend.NET.Regex" Version="2024.9.9.1414" />
paket add Extend.NET.Regex --version 2024.9.9.1414
#r "nuget: Extend.NET.Regex, 2024.9.9.1414"
// Install Extend.NET.Regex as a Cake Addin #addin nuget:?package=Extend.NET.Regex&version=2024.9.9.1414 // Install Extend.NET.Regex as a Cake Tool #tool nuget:?package=Extend.NET.Regex&version=2024.9.9.1414
Extend.NET.Regex
Last Updated: 2024-09-09 14:14:29
📖 Overview
Extend.NET.Regex is part of the Extend.NET suite, providing a collection of powerful and easy-to-use extension methods for Regex types in .NET applications. These extensions aim to simplify common tasks and enhance developer productivity.
🧰 Extension Methods
ConvertToCamelCase
Converts a string to camelCase.
ConvertToSnakeCase
Converts a camelCase or PascalCase string to snake_case.
CountWords
Counts the number of words in the input string.
ExtractAcronyms
Extracts all acronyms (words consisting of capital letters) from the input string.
ExtractCurrencyValues
Extracts currency values from the input string. Supports formats like $10.99, €20.50, £30, etc.
ExtractDates
Extracts all dates from the input string. Supports formats: MM/DD/YYYY, MM-DD-YYYY, YYYY-MM-DD
ExtractEmails
Extracts all email addresses from the input string.
ExtractHashtags
Extracts all hashtags from the input string.
ExtractHexColors
Extracts all hexadecimal color codes from the input string. Supports formats: #RGB and #RRGGBB
ExtractIpAddresses
Extracts all IP addresses (IPv4) from the input string.
ExtractJsonKeys
Extracts all JSON keys from the input string.
ExtractMarkdownHeaders
Extracts all Markdown headers from the input string. Supports headers from level 1 (# Header) to level 6 (###### Header).
Text
Extracts all Markdown links from the input string.
ExtractNumbers
Extracts all numbers from the input string.
ExtractPhoneNumbers
Extracts all phone numbers from the input string. Supports formats like (123) 456-7890, 123-456-7890, and 1234567890.
ExtractQuotedText
Extracts all text enclosed in double quotes from the input string.
ExtractTimeFromString
Extracts time in HH:MM or HH:MM:SS format from the input string.
ExtractTwitterHandles
Extracts all Twitter handles from the input string.
ExtractUrls
Extracts all URLs from the input string.
ExtractXmlTags
Extracts all XML tags from the input string.
IsMatch
Determines whether the specified regex pattern matches the input string.
IsStrongPassword
Determines whether the input string is a strong password. A strong password is defined as having at least 8 characters, including at least one uppercase letter, one lowercase letter, one number, and one special character.
IsValidCreditCardNumber
Determines whether the input string is a valid credit card number. Supports major credit card formats (Visa, MasterCard, American Express, Discover).
IsValidEmail
Determines whether the input string is a valid email address.
IsValidGuid
Determines whether the input string is a valid GUID.
IsValidHexColor
Determines whether the input string is a valid hexadecimal color code. Supports formats: #RGB, #RRGGBB
IsValidIPv4Address
Determines whether the input string is a valid IPv4 address.
IsValidIPv6Address
Determines whether the input string is a valid IPv6 address.
IsValidISBN
Determines whether the input string is a valid ISBN (International Standard Book Number). Supports both ISBN-10 and ISBN-13 formats, with or without hyphens.
IsValidMacAddress
Determines whether the input string is a valid MAC address.
IsValidPhoneNumber
Determines whether the input string is a valid phone number.
IsValidPostalCode
Determines whether the input string is a valid postal code. Supports US ZIP codes (5 digits or 5+4 format) and Canadian postal codes.
IsValidSSN
Determines whether the input string is a valid US Social Security Number (SSN).
IsValidUrl
Determines whether the input string is a valid URL.
IsValidUsername
Determines whether the input string is a valid username. Valid usernames contain only alphanumeric characters, underscores, and hyphens, and are between 3 and 20 characters long.
Matches
Searches the input string for all occurrences of a regular expression pattern.
NormalizeWhitespace
Normalizes whitespace in the input string by replacing multiple consecutive whitespace characters (including newlines and tabs) with a single space.
RemoveComments
Removes C-style comments (both single-line and multi-line) from the input string.
RemoveDuplicateWords
Removes duplicate words from the input string.
RemoveHtmlTags
Removes all HTML tags from the input string.
RemoveNonAlphanumeric
Removes all non-alphanumeric characters from the input string.
RemoveSpecialCharacters
Removes all special characters from the input string, leaving only letters and numbers.
Replace
Replaces all occurrences of a specified regex pattern in the input string with a replacement string.
ReplaceFirstOccurrence
Replaces the first occurrence of a specified regex pattern in the input string with a replacement string.
ReplaceNewlinesWithHtmlBreaks
Replaces newline characters in the input string with HTML line break tags.
ReplaceWithMask
Replaces characters in the input string with a mask character, based on a regular expression pattern.
ReplaceWordWithAsterisks
Replaces all occurrences of a specified word with asterisks, preserving the word's length.
Split
Splits the input string into an array of substrings at the positions defined by a regular expression pattern.
SplitCamelCase
Splits a camelCase or PascalCase string into separate words.
TrimExcessWhitespace
Trims excess whitespace from the input string, leaving only single spaces between words.
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. |
-
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 |
---|---|---|
2024.9.9.1414 | 106 | 9/9/2024 |
2024.9.9.1402 | 102 | 9/9/2024 |
2024.9.9.1338 | 100 | 9/9/2024 |
2024.9.9.1335 | 101 | 9/9/2024 |
2024.9.9.1320 | 102 | 9/9/2024 |
2024.9.9.1225 | 105 | 9/9/2024 |
2024.9.9.1052 | 106 | 9/9/2024 |
2024.9.9.1045 | 112 | 9/9/2024 |