Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- string = "a1a1a1b11b1c1cc2c2ytyty23"
- pattern = r"\d+"
- print(re.findall(pattern, string))
- #['1', '1', '1', '11', '1', '1', '2', '2', '23']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement