Skip to content

Commit fc76056

Browse files
committed
Cleanup regex for detecting keywords (fixes #709).
1 parent 7fdb2da commit fc76056

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqlparse/keywords.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
(r'(NOT\s+)?(REGEXP)\b', tokens.Operator.Comparison),
8787
# Check for keywords, also returns tokens.Name if regex matches
8888
# but the match isn't a keyword.
89-
(r'[0-9_\w][_$#\w]*', PROCESS_AS_KEYWORD),
89+
(r'\w[$#\w]*', PROCESS_AS_KEYWORD),
9090
(r'[;:()\[\],\.]', tokens.Punctuation),
9191
(r'[<>=~!]+', tokens.Operator.Comparison),
9292
(r'[+/@#%^&|^-]+', tokens.Operator),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy