mirror of
https://github.com/github/codeql.git
synced 2026-06-17 02:41:08 +02:00
10 lines
252 B
Python
10 lines
252 B
Python
import re
|
|
matcher = re.compile(r'(P<name>[\w]+)')
|
|
|
|
def only_letters(text):
|
|
m = matcher.match(text)
|
|
if m:
|
|
print("Letters are: " + m.group('name'))
|
|
|
|
#Fix the pattern by adding the missing '?'
|
|
fixed_matcher = re.compile(r'(?P<name>[\w]+)') |