You are viewing a single comment's thread. Return to all comments →
regex_pattern = r'^.{3}..{3}..{3}..{3}$'
we need to use ^ at the start and $ at the end as we search for exact match in the entire test_string
test_string must be in the required format and there is only one occurence of the required string we are searching for.
I hope I explain it well
Seems like cookies are disabled on this browser, please enable them to open this website
Matching Anything But a Newline
You are viewing a single comment's thread. Return to all comments →
regex_pattern = r'^.{3}..{3}..{3}..{3}$'
we need to use ^ at the start and $ at the end as we search for exact match in the entire test_string
test_string must be in the required format and there is only one occurence of the required string we are searching for.
I hope I explain it well