mirror of
https://github.com/github/codeql.git
synced 2026-06-18 03:11:07 +02:00
10 lines
281 B
Python
10 lines
281 B
Python
import re
|
|
#Regular expression that includes a dollar, but not at the end.
|
|
matcher = re.compile(r"\.\(\w+$\)")
|
|
|
|
def find_it(filename):
|
|
if matcher.match(filename):
|
|
print("Found it!")
|
|
|
|
#Regular expression anchored to end of input.
|
|
fixed_matcher = re.compile(r"\.\(\w+\)$") |