Oct-02-2022, 05:42 AM
Hello,
(Oct-02-2022, 04:50 AM)deanhystad Wrote: Some characters have special meanings in regular expressions, such as (). You obviously know this because your used backslashes to remove their special meaning in this:We can use a rstring...
re.findall('_+\s?\([^\)]+\)', text)You could proces the regex strings to add in the backslashes, but it is easier to use str.replace().
I speak Python but I don't speak English (I just read it a little). If I express myself badly, please blame the translator^^.