I have text as below-
my_text = "My telephone number is 408-555-1234"
on which i am searching the pattern
re.findall(r'\d{3}-\d{1,}',my_text)
My intention was to search for three digit numeric value followed by -
and then another set of one or more than one digit numeric value. Hence I was expecting the result to be - ['408-555','555-1234']
,
However the result i am getting os only ['408-555']
.
Could anyone suggest me what is wrong in my understaning here. And suggest a pattern that would serve my purpose