Skip to content

jeremyrsellars/HighRegex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Higher Order Regular Expressions for .Net

Higher order

"Higher-order" speaks to the complexity of the data and of the expression. While classic regex matches sequences of characters, HighRegex supports sequences of any type, for example a token in text processing or a datapoint.

In Functional Programming, "Higher Order Functions" are functions that take other functions as a parameter and/or return functions. Similarly, higher order regular expressions are composed of other regular expressions.

HighRegex supports:

HighRegex does not support:

  • Grouping and back-referencing (?<lastName>name)
    • Grouping would be a great feature... Hopefully that is coming soon.
    • Back-referencing \1 would be a nice feature, but may add complexity. Ideally, if breaking changes are necessary to support this, it would be opt-in.
  • Modifiers (?i), etc.
    • Since you have complete control over the classes, modifiers are probably not necessary.
  • Atomic Grouping (?>right|left) is not supported.
    • This would be a nice feature, and probably not too difficult.
  • Continuing matches \G is not supported.
  • Comments. (?# not supported)
    • you'll probably be using an expression composed of self-documenting, named expressions, making comments unnecessary
  • Replacements. Regex.Replace("ABC", "[AEIOU]", "o") This would be an interesting way to do substitutions or perhaps delete "bad data" from a sequence.

About

Higher order regular expressions for IList<T> instead of IList<char> (strings).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages