compile-time-regular-expressions icon indicating copy to clipboard operation
compile-time-regular-expressions copied to clipboard

Case-insensitive search support?

Open vadz opened this issue 3 years ago • 3 comments

Thanks for the impressive library, but trying to migrate my existing code using Boost.Regex to it, I ran into the following problem: there currently doesn't seem to be any equivalent to std::regex::icase and PCRE-like (?i) is not supported neither (as indicated by the mention of lack of support for PCRE options in the README, of course).

Am I missing something, i.e. is there some other way to make the match case-insensitive, other than the obvious, but ugly, one of using [fF][oO][oO], or is this just not supported at all?

vadz avatar Jun 02 '21 16:06 vadz

Currently it's not supported at all as case sensitivity especially in world of unicode is quite complicated subject.

hanickadot avatar Jun 02 '21 18:06 hanickadot

I'll happily take an ASCII only solution. Anything is better than nothing.

FergoTheGreat avatar Oct 11 '23 14:10 FergoTheGreat

What about using std::views::transform(std::tolower) | ctre::match<"regex"> or something similar?

hanickadot avatar Oct 11 '23 14:10 hanickadot