Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- line = "041234322222_041234322222_SW_0351_20190921_01"
- rule = r"(SW[0-9_][0-9]*)_"
- res = re.search(rule, line, re.IGNORECASE)
- if res:
- print(res.groups()[0])
- else:
- print("Nessun risultato trovato.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement