You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like we can set it such as REGEXP '(?i)LINUS with (?i) in the regex itself, e.g. to match linus, Linus, LINUS, etc. Having a flag would be great too somehow (?)
Yeah, the (?i) syntax is the current way to define flags, like:
select
value,
value regexp '(?i)linus' ,
value regexp 'linus'from json_each('["linus", "Linus", "LINUS", "moo"]');
/*┌───────┬──────────────────────────┬──────────────────────┐│ value │ value regexp '(?i)linus' │ value regexp 'linus' │├───────┼──────────────────────────┼──────────────────────┤│ linus │ 1 │ 1 ││ Linus │ 1 │ 0 ││ LINUS │ 1 │ 0 ││ moo │ 0 │ 0 │└───────┴──────────────────────────┴──────────────────────┘*/
The underlying Rust regex crate doesn't offer a way to define flags in any other way. I may also add a new regexpi() function that'll implicitly add the ignore flag in the next reelase.
There's a comment here but it seems unrelated to the code
sqlite-regex/src/regex.rs
Lines 10 to 11 in 5fe28e3
i
)The text was updated successfully, but these errors were encountered: