<div> </div>
<div>I'm trying to parse a file and extract 'src=<a href="http://172.16.148.27">172.16.148.27</a> dst=<a href="http://10.52.10.10">10.52.10.10</a>' out of each line that contains <a href="http://10.52.10.10">
10.52.10.10</a>, but get lost with writing the information and am not sure if I should .re at all.</div>
<div> </div>
<div>
<p>import re</p>
<p>infile = open("in.txt","r")<br>outfile = open("out.txt", "w")</p>
<p>for line in infile:<br> re.match('src=*<a href="http://10.52.10.10">10.52.10.10</a>')<br> outfile.write(re.compile)</p>
<p><br>ofile.close()<br>wfile.close()</p></div>