I have to extract a string from a network response which looks like shown below:
Hello, did you get this message?
I want to check it,
let me know!
Here is your encrypted text:
96a1e3424f4cfa23db131173d7f8c93396a1e3424f4cfa23db131173d7f8c933182bc4e99a47abb5deaa51741527dd2b478746563aecc40d5d6f6597370338a7
Some more text:
The response contains "\r\n" or if checked on Linux, then "\n"
How can I extract the hash from above message?
I wrote something like below but it did not extract the hash:
import re
# data corresponds to network response which contains the \r\n characters
matchObj = re.match( r'(.*?)your encrypted text:\r\n(.*)\r\n.*', data)
if matchObj:
print matchObj.group(2)
Thanks.
your encrypted text:in your input?