Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b19a14 commit f1e16afCopy full SHA for f1e16af
1 file changed
upgrade_pythoncapi.py
@@ -16,7 +16,8 @@
16
17
18
# Match a C identifier: 'identifier', 'var_3', 'NameCamelCase'
19
-ID_REGEX = r'[a-zA-Z][a-zA-Z0-9_]*'
+# Use \b to only match a full word: match "a_b", but not just "b" in "a_b".
20
+ID_REGEX = r'\b[a-zA-Z][a-zA-Z0-9_]*\b'
21
# Match 'array[3]'
22
SUBEXPR_REGEX = fr'{ID_REGEX}(?:\[[^]]+\])*'
23
# Match a C expression like "frame", "frame.attr" or "obj->attr".
0 commit comments