Skip to content

RegExHelper is designed to help people with less knowledge about regex, so that they are still able to use regex by themself

License

Notifications You must be signed in to change notification settings

Fabian2000/regexhelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RegexHelper

RegexHelper is a C# library that helps developers create regular expressions (RegEx) with ease. It provides a clear and intuitive syntax for building RegEx patterns, along with preconfigured RegEx codes for commonly used scenarios.

Features

  • Fluent RegEx Builder: Use the RegexBuilder class to create RegEx patterns in a simple and readable manner.
  • Preconfigured RegEx Codes: The RegExPrepared class contains a collection of predefined RegEx codes for typical use cases.
  • Easy Installation: The project is based on .NET7 (C# 11) and can be installed via NuGet.
  • Cross-Platform: The library is platform-independent and can be used in .NET applications on various operating systems.

Usage

Use the RegexBuilder class to create RegEx patterns. Here's a simple example:

var regex = new RegExBuilder()
    .Start()
    .Text("Hello")
    .WhiteSpace()
    .OneOrMoreOfLastExpression()
    .Text("World")
    .End()
    .ToRegex();

string input = "Hello     World";
bool isMatch = regex.IsMatch(input);

Console.WriteLine($"Input: {input}");
Console.WriteLine($"Is Match: {isMatch}");
Console.ReadKey(true);

For more examples and detailed information, please refer to the documentation.

License

This project is licensed under the MIT License. For more information, see the license file.

About

RegExHelper is designed to help people with less knowledge about regex, so that they are still able to use regex by themself

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages