Advertisement
exDotaPro

password_regex

Jul 26th, 2020 (edited)
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. import re
  2.  
  3. regex = r"(.+)>(\d{3})\|([a-z]{3})\|([A-Z]{3})\|([^><]{3})<(\1)"
  4.  
  5. for _ in range(int(input())):
  6.     data = re.findall(regex, input())
  7.  
  8.     if data:
  9.         for match in data:
  10.             print(f'Password: {match[1]}{match[2]}{match[3]}{match[4]}')
  11.     else:
  12.         print('Try another password!')
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement