I am new to python and want to run a code in Python.
Code that I have written is
#!/usr/bin/python
import sys
import re
for line in sys.stdin:
results = re.search('ipAddress=([^&]*])', line)
if len(results.group(1)) != 0:
print results.group(1)
Requirement is finding IP address in a string.String will be something like this
blah....ipAddress=173.110.208.118&deviceId
Output: 173.110.208.118
Please let me know what I am doing wrong..