aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/query/lexer.go
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2025-08-05 14:21:06 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2025-08-05 14:21:06 -0400
commit630115fe1074640496e629b67b6c60d0d88aea82 (patch)
tree7766e8a90cd9045c18eda8c9d2189700dd2d4d55 /pkg/query/lexer.go
parent2e79d1ece2737848234adec61cca77f9f604fce2 (diff)
Change regex operator symbol
Diffstat (limited to 'pkg/query/lexer.go')
-rw-r--r--pkg/query/lexer.go4
1 files changed, 2 insertions, 2 deletions
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 := `(?<negation>-?)`
categoryPattern := `(?<category>T|p(?:ath)?|a(?:uthor)?|d(?:ate)?|f(?:iletime)?|t(?:ags|itle)?|h(?:eadings)?|l(?:inks)?|m(?:eta)?)`
- opPattern := `(?<operator>!re!|!=|<=|>=|=|:|~|<|>)`
+ opPattern := `(?<operator>!=|<=|>=|=|:|/|~|<|>)`
valPattern := `(?<value>".*?"|\S*[^\s\)])`
statementPattern := `(?<statement>` + negPattern + categoryPattern + opPattern + valPattern + `)`
unknownPattern := `(?<unknown>\S*".*?"[^\s)]*|\S*[^\s\)])`