Skip to content

case-insensitive matching and look-behind

Compare
Choose a tag to compare
@hanickadot hanickadot released this 01 Jun 20:37
· 83 commits to main since this release
331aebc

Support for:

  • lookbehind positive (<=abc) and negative (<!abc)
  • case insensitive matching for ASCII only ctre::OPERATION<"regex", ctre::case_insensitive>(subject_or_range) (example: ctre::match<"[a-z]+", ctre::case_insensitive>(input)

Notes:
don't use mixes case range when doing case_insensitive:

  • [a-z] will match a-zA-Z
  • [a-Z] won't match anything (as ascii(a) > ascii(Z))
  • [A-z] will match more than you expect A-Z[\]^_a-z + backtick (as I don't know how to type in markdown correctly)