In my python code i want to pattern match a string for atleast two consecutive alphabets anywhere in the string.
I used, re.match(r'([a-zA-Z][a-zA-Z])+',str)
This matches a string for example ‘abc’, but does not match ‘1abc’. What is the mistake in my regex ?
Please Help
Thank You
The method
matchlooks from the beginning of the string only. You should usesearchinstead.Also your regex is built to match an even amount of characters.