Skip to content

Releases: hanickadot/compile-time-regular-expressions

v3.9.0

16 May 21:02
Compare
Choose a tag to compare
  • you can now use CTRE as C++ module! with -DCTRE_MODULE=ON (experimental) πŸŽ‰
  • ctre::range is deprecated and replaced with ctre::search_all
void print_all_string(std::string_view subject) {
  for (auto word: ctre::search_all<"\\w+">(subject)) {
    std::cout << word.to_view() << "\n";
  }
}
  • simple ctre::capture_group concept
  • capture groups / result type now has .to_optional_number(...) member function which returns std::nullopt if group is not matching
std::optional<int> parse_number(std::string_view) {
  return ctre::match<"([0-9]+)">(subject).to_optional_number();
}
  • fixed #305 (missing binary_property first-follow checker

v3.8.1

14 Oct 10:55
Compare
Choose a tag to compare
  • fix of error with checked iterators in MSVC when ctre::split range return last item empty
  • update cmake project version to mirror release version

v3.8

28 Jul 05:42
Compare
Choose a tag to compare
  • ability to build ctll::fixed_string from pointer and std::array (ctll::fixed_string<N>(ctll::construct_from_pointer, ptr))
  • improved compatibility issues of operator== and operator!= utf8_iterator and utf8_sentinel

explicit operator bool

30 Jan 21:43
Compare
Choose a tag to compare

conditional [[msvc::flatten]] and explicit operator bool on capture groups, which fixes #275

miscellaneous fixes + switching modes

01 Oct 05:30
1ca2fa8
Compare
Choose a tag to compare
  • switching modes inside pattern (pattern: (?i)AB(?c)AB matches string: "abAB")
  • better detection of char8_t support
  • fix build failure in libc++ debug mode
  • remove some shadowing warnings

case-insensitive matching and look-behind

01 Jun 20:37
331aebc
Compare
Choose a tag to compare

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)

v3.6

20 Mar 12:49
Compare
Choose a tag to compare
  • [[:punct:]] behaves as ispunct in C
  • fix for several MSVC warnings
  • cmake library is using C++20 by default (you can change it back with -DCTRE_CXX_STANDARD=17)
  • CI/CD for all supported compilers (+ some fixes along the way)

Unicode 14 support

23 Jan 16:44
Compare
Choose a tag to compare
  • updated to Unicode 14
  • fix in UTF-16 support in patterns
  • better support of C++17 modes on newer compilers

clang 12 support + gcc ranges support

17 Apr 10:07
Compare
Choose a tag to compare
v3.4.1

properly rangyfi ctre

clang 12 support

17 Apr 08:49
Compare
Choose a tag to compare

This release supports clang 12 properly.