I have multiple strings like this 90'4 I want to extract the digits from the string and sum them up to get 94.
I tried compiling the pattern.
pattern="\d'\d"
re.compile(pattern)
I tried the methods findall and match, but did not get what I wanted.
I need to use regex I cannot use .split()
Use
\d+withfindallto extract numbers and then find their sum: