Introducing Hitori – generic compile-time regular expressions library

226 points m30bit

https://docs.rs/hitori

Features:

  • Write regular expressions for any character type
  • Add immutable or mutable state to regular expressions (see examples/generics)
  • Use functions or methods of the state for matching
  • Capture index ranges into struct fields (see examples/capturing)
  • Expression syntax consists of parenthesis, square brackets and 3 attributes (see examples)
  • Beware that left recursion is evil, as far as hitori is concerned (see the limitations section)