C:\Users\dibyajyo>python
Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>> import re
>>> outString = 'DiagnosticPath = fs0:\\efi\\tools'
>>> print outString
DiagnosticPath = fs0:\efi\tools
>>> expString = 'DiagnosticPath = fs0:\\efi\\tools'
>>> print expString
DiagnosticPath = fs0:\efi\tools
>>> matchObj = re.search( expString, outString, re.M|re.I)
>>> if matchObj:
... print matchObj.group()
...
>>>
Both expString
and outString
strings are the same yet not sure why I am not finding any match...