here2share

# Tk_regex_generator.py

Feb 7th, 2020
276
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. # Tk_regex_generator.py -- ZZZ
  2.  
  3. sss = ''
  4. punct = '''[A-Za-z0-9 {}~<=>,;:`_'!"#$%&@]+$'''
  5. include = []
  6. for z in '''\   [](){}-|?+*.$^''':
  7.     sss = sss.replace(z,'')
  8.     if z not in set(list(sss)):
  9.         include.append(z)
  10. sss = '\\'.join(include)
  11. sss = sss.replace(' ','t')
  12. regex = punct.format(sss)
  13. print regex
Add Comment
Please, Sign In to add comment