Reputation: 627
I would like to match number strings like '76' but not '76er'
I've tried the following, and experimenting with [^a-z] so I don't capture a-z characters after the 2-3 digits but for some reason not working with my test string
test = "Boston Celtics 112 Philadelphia 76ers 95"
should return ["112", "95"]
re.findall(r"\d{2,3}", mystring)
Upvotes: 0
Views: 95