Advertisement
FranzVuttke

rematchtest.py

Jan 10th, 2024
737
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | Source Code | 0 0
  1.  
  2. import re
  3.  
  4. patt = r'[A-Z]{1,}[a-z]*[0-9]'
  5. def check_patt(apatt, astring):
  6.     print("pattern: ",apatt)
  7.     print("string: ", astring)
  8.     print("is matching? ",True if re.match(apatt, astring) else False)
  9.    
  10.     ...
  11.    
  12. check_patt(patt, "ROMANIITEDIMUMl10")
  13.  
Tags: rematchtest
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement