This project allows users to create and maintain regular expressions by building them inline within their C#. While it may appear a bit verbose it means that it's easier to understand and modify when necessary.
A regular expression is a powerful text-parsing tool that is built into many modern programming languages. It offers a lot of power in a little string; unfortunately, that string happens to be impossible to read.
Don't get me wrong, regular expressions are great things but I find that whenever I write them and then have to modify them later I've entirely forgotten how it works and need to rebuild it from scratch or piecemeal. Aside from the fact that I don't know
what it does what happens if another developer needs to work with it? What is the likelihood that they'll be able to understand what it does and modify it if necessary? In my experience, it's not very good.
- Support for the most common regex constructs:
- Back references
- Character sets (\d, \D, \b, \B, \s, \S, \w, \W, and '.')
- End of a string
- Logical groups
- Look ahead
- Look behind
- Non-set matches
- Optional flags (? * and +) with or without lazy evaluation
- Quantifiers (explicit, range, and minimum)
- Set matches
- Start of a string
- Allows direct text injection
- Easily work with matching a pattern or a empty string
- C# overrides for Equals, GetHashCode, ToString
- C# constructors for explicit conversion between string, Regex, and RegexBuilder
- Optionally encodes input
- CLS Compliant
- Creates a Strong-Named Assembly
- This site contains examples and documentation (always a work in progress)