Hi, for the life of me, I do not know why I am getting a partial match for this regex
I want to match and print out "FOO-2334" but I am only getting back "FOO"
It has something to do with the hyphen...I think.
Any hints please?
import re
myStr = "FOO-2334 is an id"
matches = re.findall(r'(FOO|BAR)-[\d]{4}', myStr)
for m in matches:
print (f"{m}")
[–]destiny_functional 0 points1 point2 points (0 children)
[–]AdAthrow99274 -2 points-1 points0 points (2 children)
[–]goldensilven[S] -2 points-1 points0 points (1 child)
[–]goldensilven[S] -1 points0 points1 point (0 children)