Guest User

Untitled

a guest
May 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. phrase1 = "Simple String with some UPPercase in Between ends with?"
  2. phrase2 = "BIG STRING ALL CAPS ENDS WITH?"
  3. phrase3_a = "ALLCAPSSTRING NOTHING AT THE END OF STRING"
  4. phrase3_b = "Any String with ALL UPPERCASE (or not) but ends with!"
  5. phrase4 = "tttt"
  6.  
  7. phrase=re.sub(r'[s]','',phrase)
  8.  
  9. pattern_phrase1 = re.compile (r'[a-zA-Z0-9]?$')
  10. pattern_phrase2 = re.compile (r'[A-Z0-9]?$')
  11. pattern_phrase3 = re.compile (r'[A-Z]|[.!$]')
Add Comment
Please, Sign In to add comment