diff options
author | Andi Albrecht <albrecht.andi@gmail.com> | 2023-03-20 08:46:10 +0100 |
---|---|---|
committer | Andi Albrecht <albrecht.andi@gmail.com> | 2023-03-20 08:46:10 +0100 |
commit | fc76056fb8f0ec713a3f2a2b6206a3336932c382 (patch) | |
tree | 95d59be2a17edcf4afe575a5c0d8c8c732e76c61 | |
parent | 7fdb2da82d51a9a02baaefb5c7fe5cbbaac4329e (diff) | |
download | sqlparse-fc76056fb8f0ec713a3f2a2b6206a3336932c382.tar.gz |
Cleanup regex for detecting keywords (fixes #709).
-rw-r--r-- | sqlparse/keywords.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlparse/keywords.py b/sqlparse/keywords.py index f04f928..f85d468 100644 --- a/sqlparse/keywords.py +++ b/sqlparse/keywords.py @@ -86,7 +86,7 @@ SQL_REGEX = [ (r'(NOT\s+)?(REGEXP)\b', tokens.Operator.Comparison), # Check for keywords, also returns tokens.Name if regex matches # but the match isn't a keyword. - (r'[0-9_\w][_$#\w]*', PROCESS_AS_KEYWORD), + (r'\w[$#\w]*', PROCESS_AS_KEYWORD), (r'[;:()\[\],\.]', tokens.Punctuation), (r'[<>=~!]+', tokens.Operator.Comparison), (r'[+/@#%^&|^-]+', tokens.Operator), |