fork download
  1. import re
  2. ptr2="hdjfhdjh@@@@"
  3. str1=re.compile(r'^[a-zA-Z0-9]+$')
  4. if str1.search(ptr2):
  5. print (" string matches %s",ptr2)
  6. else:
  7. print (" string not matches pattern %s",ptr2)
Success #stdin #stdout 0.01s 9016KB
stdin
Standard input is empty
stdout
(' string not matches pattern %s', 'hdjfhdjh@@@@')