xxxxxxxxxx
Find below are online regex tester
https://regex101.com/
https://pythex.org/
http://www.pyregex.com/
https://www.debuggex.com/
Here you insert your regular expression and get the test result.
Thank you !!!
xxxxxxxxxx
import re
# Define the pattern
pattern = r'^[a-zA-Z0-9]+$'
# Define the string to check
string_to_check = 'AbCdEf123'
# Check if the string matches the pattern
match = re.match(pattern, string_to_check)
# Print the result
if match:
print("String matches the pattern")
else:
print("String does not match the pattern")