Question: Extract all consecutive numbers appearing in a string.

Here is a string, and I want to treat consecutive single digits as a single number and extract them. I can process it using regular expressions in Python. I'm not sure if Maple can handle it in a similar way.

import re
sstr1 = "124e34e243e45e56e76f34e45e23ea12e98e34e43"
num=re.findall(r'\d+', sstr1)
s=list(map(int, num))
print(s)

[124, 34, 243, 45, 56, 76, 34, 45, 23, 12, 98, 34, 43]

Is there an equivalent regular expression method in Maple?

Please Wait...