10 lines
318 B
Python
10 lines
318 B
Python
|
with open("tresc_zadan/marki-samochodów.txt","r") as car_brands:
|
||
|
regex = "(?<="
|
||
|
for brand in car_brands:
|
||
|
regex += brand.removesuffix("\n") + " |"
|
||
|
# regex[len(regex)-1] = ")"
|
||
|
# print(regex[:len(regex)-1])
|
||
|
regex = regex.removesuffix("|") + ")"
|
||
|
regex += "[A-Z][a-z\s\-A-Z]*"
|
||
|
|
||
|
print(regex)
|