Skip to content

Commit

Permalink
fix: set re2 as case insenitive
Browse files Browse the repository at this point in the history
  • Loading branch information
djpiper28 committed Jul 27, 2023
1 parent 2a9a1cd commit ea5525b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mse/re2_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

int mse_re_init(mse_re_t *re, char *str)
{
re->__re = new RE2(std::string(str));
std::string restr = std::string(str);
RE2::Options options;
options.set_case_sensitive(true);

re->__re = new RE2(restr, options);
if (!re->__re->ok()) {
lprintf(LOG_ERROR, "Invalid regex, cannot compile\n");
mse_re_free(re);
Expand Down

0 comments on commit ea5525b

Please sign in to comment.