Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if regex matches python

import re

test_string = 'a1b2cdefg'

matched = re.match("[a-z][0-9][a-z][0-9]+", test_string)
is_match = bool(matched)

print(is_match)
 
PREVIOUS NEXT
Tagged: #check #regex #matches #python
ADD COMMENT
Topic
Name
8+7 =