semantic update
This commit is contained in:
13
test_regex.py
Normal file
13
test_regex.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import re
|
||||
|
||||
patterns = {
|
||||
"console_log": re.compile(r"console\.log\s*\(\s*['\"]\[[\w_]+\]\[[A-Za-z0-9_:]+\]"),
|
||||
}
|
||||
|
||||
with open("frontend/src/lib/components/assistant/AssistantChatPanel.svelte") as f:
|
||||
for i, line in enumerate(f):
|
||||
if "console.log" in line:
|
||||
if patterns["console_log"].search(line):
|
||||
print(f"Match: {line.strip()}")
|
||||
else:
|
||||
print(f"No match: {line.strip()}")
|
||||
Reference in New Issue
Block a user