Your pattern ^([0-9]{1,2}){1}\-[aA-zZ\s+]+
starts with an anchor ^
which limits the matching to the start of the string.
You can omit {1}
and the ranges in the character class are not the same as [a-zA-Z]
as A-z
matches more characters.
Adding \s
in the single character class can possible also match only spaces or newlines, so 4-
would also match.
You can use a pattern with 2 capture groups, and use re.findall to return the capture group values in tuples, and end the match with a-zA-Z chars to not match spaces only.
\b([0-9]{1,2})-([a-zA-Z]+(?:\s+[a-zA-Z]+)*)\b
The pattern matches:
\b
A word boundary to prevent a partial match
([0-9]{1,2})
Capture group 1, match 1-2 digits
-
Match a hyphen
(
Capture group 2
[a-zA-Z]+
Match 1+ chars a-zA-Z
(?:\s+[a-zA-Z]+)+
Optionally repeat 1+ whitespace chars and 1+ chars a-zA-Z
)*
Close group 2
\b
A word boundary
Regex demo
For example
import re
s = '1-New Bathroom 2-New Kitchen 3-New Garden 4-Caribbean Holiday'
pattern = r'\b([0-9]{1,2})-([a-zA-Z]+(?:\s+[a-zA-Z]+)*)\b'
print(re.findall(pattern, s))
Output
[('1', 'New Bathroom'), ('2', 'New Kitchen'), ('3', 'New Garden'), ('4', 'Caribbean Holiday')]