I am trying some regexes in python
re.compile('in versions: (.+?) of '+name+' ')
and, if name is 'libcrypto++', cause multiple repeat error
how can i handle it only in a string..?
+
is a quantifier in regex. So when you add libcrypto++
to regex string, it brings two of them alongside that doesn't make sense.
See this.
To solve this you can use regex escape method, like:
re.compile('in versions: (.+?) of '+ re.escape(name) +' ')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With