fork download
  1. # your code goes hereimport re
  2. import re
  3.  
  4. regex = r"^\$[a-zA-Z0-9]+"
  5. test_str = ("$abc123&**@#$&@#$ ")
  6. is_match = re.search(regex, test_str)
  7. if(is_match):
  8. print("Yes")
  9. else:
  10. print("No")
  11.  
Success #stdin #stdout 0.03s 9464KB
stdin
Standard input is empty
stdout
Yes