This commit is contained in:
Stephan Porada 2021-10-31 00:03:54 +02:00
parent 7af6522140
commit 4076dbc44e
2 changed files with 1273 additions and 0 deletions

23
03/find_pattern.py Normal file
View File

@ -0,0 +1,23 @@
from utils.Url import Url
from utils.read import read_string
import re
def find_pattern(pattern_string):
string = read_string('string.txt')
regex = re.compile(pattern_string)
matches = regex.findall(string)
return ''.join(matches)
def main():
pattern_string = r'[a-z][A-Z]{3}(?P<solution>[a-z]){1}[A-Z]{3}[a-z]'
string = find_pattern(pattern_string)
builder = Url()
builder.slug = 'php'
builder.solution = string
print(builder.url)
if __name__ == '__main__':
main()

1250
03/string.txt Normal file

File diff suppressed because it is too large Load Diff