Releases: hanickadot/compile-time-regular-expressions
Releases Β· hanickadot/compile-time-regular-expressions
v3.9.0
- you can now use CTRE as C++ module! with
-DCTRE_MODULE=ON
(experimental) π ctre::range
is deprecated and replaced withctre::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
- 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
- ability to build
ctll::fixed_string
from pointer andstd::array
(ctll::fixed_string<N>(ctll::construct_from_pointer, ptr)
) - improved compatibility issues of
operator==
andoperator!=
utf8_iterator
andutf8_sentinel
explicit operator bool
conditional [[msvc::flatten]]
and explicit operator bool
on capture groups, which fixes #275
miscellaneous fixes + switching modes
- 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
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 matcha-zA-Z
[a-Z]
won't match anything (as ascii(a) > ascii(Z))[A-z]
will match more than you expectA-Z[\]^_a-z
+ backtick (as I don't know how to type in markdown correctly)
v3.6
- [[: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
- 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
v3.4.1 properly rangyfi ctre
clang 12 support
This release supports clang 12 properly.