I am replacing string content as:
re.sub(all, val, parsedData['outData'])
where all
contains some round braces and might contain other characters.
>>> print all
PICDSPVERS="DspFw:1.0008(1.0008),Fpga1:2.0925(2.0925),Fpga2:1.0404(1.0404),Mcu:1.0000(1.0000)"
Because of which matching fails. The pattern is coming from some interface, so I don't want to put \\
in the data.
I tried with 'r' and re.U option also, but still the match fails.
re.search('PICDSPVERS="DspFw:1.0008(1.0008)', parsedData['outData'])
How can we direct Python to treat a matching pattern as a string?
I am using Python 2.x.