J
jhu
I'm not sure how to piece together a pattern which will find an IP
address after a specific string ?
So for example if the web page be searched is the snippet below and
what I want is to get the IP address 177.33.152.123. But I need to
make sure that the pattern search starts after the text "DHCP Renew"
because there are other IP addresses above the "DHCP Renew" but I have
enclosed only a snippet of the returned web page.
I have the following \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} and that works
to get the first available IP but not the one I want. Thanks in
advance.
<TD width="22%" height=25>
<DIV align=right><FONT color=#000000><B><FONT face=Arial
size=2>Connection </FONT></B></FONT></DIV></TD>
<TD width="78%" height=25><FONT face=Arial size=2>DHCP
Client
Connected <INPUT type=submit value="DHCP Release"
name=release> <INPUT type=submit value="DHCP Renew" name=renew>
</FONT></TD></TR>
<TR>
<TD width="22%" height=25>
<DIV align=right><FONT color=#000000><B><FONT
face=Arial
size=2>IP Address </FONT></B></FONT></DIV></TD>
<TD width="78%" height=25><FONT face=Arial
size=2>177.33.152.123 </FONT></TD></TR>
address after a specific string ?
So for example if the web page be searched is the snippet below and
what I want is to get the IP address 177.33.152.123. But I need to
make sure that the pattern search starts after the text "DHCP Renew"
because there are other IP addresses above the "DHCP Renew" but I have
enclosed only a snippet of the returned web page.
I have the following \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} and that works
to get the first available IP but not the one I want. Thanks in
advance.
<TD width="22%" height=25>
<DIV align=right><FONT color=#000000><B><FONT face=Arial
size=2>Connection </FONT></B></FONT></DIV></TD>
<TD width="78%" height=25><FONT face=Arial size=2>DHCP
Client
Connected <INPUT type=submit value="DHCP Release"
name=release> <INPUT type=submit value="DHCP Renew" name=renew>
</FONT></TD></TR>
<TR>
<TD width="22%" height=25>
<DIV align=right><FONT color=#000000><B><FONT
face=Arial
size=2>IP Address </FONT></B></FONT></DIV></TD>
<TD width="78%" height=25><FONT face=Arial
size=2>177.33.152.123 </FONT></TD></TR>