Regular matching always reports an error.

ss=" Beijing Qidan Culture Co., Ltd."
print (re.findall (. *? Co., Ltd.) {5 module 20}", ss) [0])
Traceback (most recent call last):
File "< input >", line 1, in < module >
IndexError: list index out of range
print (re.findall ("(. *? Co., Ltd.) {5 module 20}", ss) [0])
Traceback (most recent call last):
File "< input >", line 1, in < module >
IndexError: list index out of range
print (re.findall ("(. *? Co., Ltd.)", ss) [0])
Beijing liability Co., Ltd.
print (re.findall (. *? Co., Ltd.)
Traceback (most recent call last):
File "< input >", line 1, in < module >
IndexError: list index out of range
Why do I always report an error when I add a limit on length (Ltd.)
Traceback (most recent call last):
File "< input >", line 1, in < module >

? Cannot match

Dec.08,2021

{n, m}: M an dna re nonnegative numbers, with a minimum of n matches and a maximum of m matches.

Menu