Skip to content

Escape single quotes in |re regex patterns - #14

Merged
wagga40 merged 1 commit into
SigmaHQ:mainfrom
shai20000:fix/regexp-single-quote-escaping
Jul 25, 2026
Merged

Escape single quotes in |re regex patterns#14
wagga40 merged 1 commit into
SigmaHQ:mainfrom
shai20000:fix/regexp-single-quote-escaping

Conversation

@shai20000

Copy link
Copy Markdown

The re_expression template embeds the pattern in a '...' SQL string literal, but convert_value_re didn't double single quotes the way convert_value_str does.
A regex containing a ' (e.g. a ['"] character class) terminated the literal early, producing invalid SQL unrecognized token

Fixes #13

@wagga40
wagga40 merged commit aea4b51 into SigmaHQ:main Jul 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

|re modifier: single quotes in the regex are not escaped, producing invalid SQL

2 participants