Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import re
- vers = "VERSION.PROGRAM:program_name\nVERSION.SUBPROGRAM:sub_program_name"
- matchObj = re.match( 'VERSION.PROGRAM:(.*)\nVERSION.SUBPROGRAM:(.*)', vers, re.M|re.I);
- if matchObj:
- print ("matchObj.group() : ", matchObj.group())
- print ("matchObj.group(1) : ", matchObj.group(1))
- print ("matchObj.group(2) : ", matchObj.group(2))
- else:
- print ("No match!!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement