Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Switch : 800215-00-02 0805G-00232 Rev 2.0 BootROM: 1.0.3.1 IMG: 15.3.1.4
- PSU : 700214-00-05 YT675-00893 Rev 2.0 BootROM: 3.0.2.9 IMG: 19.3.6.9
- import re
- strs = [
- 'Switch : 800215-00-02 0805G-00232 Rev 2.0 BootROM: 1.0.3.1 IMG: 15.3.1.4',
- 'PSU: : 700214-00-05 YT675-00893 Rev 2.0 BootROM: 3.0.2.9 IMG: 19.3.6.9'
- ]
- regex = '^Switch.+(w{5}-w{5})'
- for str in strs:
- result = re.compile(regex).search(str)
- if result is not None:
- print(result.groups(1))
Add Comment
Please, Sign In to add comment