From 630115fe1074640496e629b67b6c60d0d88aea82 Mon Sep 17 00:00:00 2001 From: JP Appel Date: Tue, 5 Aug 2025 14:21:06 -0400 Subject: Change regex operator symbol --- pkg/query/lexer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/query/lexer.go') diff --git a/pkg/query/lexer.go b/pkg/query/lexer.go index 8a70c47..0ebdb1d 100644 --- a/pkg/query/lexer.go +++ b/pkg/query/lexer.go @@ -243,7 +243,7 @@ func tokenizeOperation(s string) Token { t.Type = TOK_OP_LT case ">": t.Type = TOK_OP_GT - case "!re!": + case "/": t.Type = TOK_OP_RE } @@ -335,7 +335,7 @@ func TokensStringify(tokens []Token) string { func init() { negPattern := `(?-?)` categoryPattern := `(?T|p(?:ath)?|a(?:uthor)?|d(?:ate)?|f(?:iletime)?|t(?:ags|itle)?|h(?:eadings)?|l(?:inks)?|m(?:eta)?)` - opPattern := `(?!re!|!=|<=|>=|=|:|~|<|>)` + opPattern := `(?!=|<=|>=|=|:|/|~|<|>)` valPattern := `(?".*?"|\S*[^\s\)])` statementPattern := `(?` + negPattern + categoryPattern + opPattern + valPattern + `)` unknownPattern := `(?\S*".*?"[^\s)]*|\S*[^\s\)])` -- cgit v1.2.3