jaldama has asked for the wisdom of the Perl Monks concerning the following question:
What would be the best way to extract the 74.125.113.147 in a general way so it could be done with whatever website is checked? I did a previous matching for an ip that looked like this:Using domain server: Name: 8.8.8.8 Address: 8.8.8.8#53 Aliases: google.com has address 74.125.113.147
But THAT wouldn't work because the output shows the domain server we're using, in this case google's 8.8.8.8 Can I pull something by line number? update 1/27 Ended up usingif ($found_addr =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) { . . .
On the linux boxes since they pull up the host info a little differently. overall, this was pretty successful though. thanks for the advice.if ($found_addr =~ m/(\d.*)/) {
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: More complicated regular expression?
by JavaFan (Canon) on Jan 26, 2012 at 15:09 UTC | |
by jaldama (Acolyte) on Jan 26, 2012 at 15:29 UTC | |
by VinsWorldcom (Prior) on Jan 26, 2012 at 15:35 UTC | |
by jaldama (Acolyte) on Jan 26, 2012 at 16:07 UTC | |
by Anonymous Monk on Jan 26, 2012 at 15:40 UTC | |
by jaldama (Acolyte) on Jan 26, 2012 at 16:29 UTC | |
by jaldama (Acolyte) on Jan 26, 2012 at 18:21 UTC | |
by Xiong (Hermit) on Jan 26, 2012 at 20:00 UTC | |
by polettix (Vicar) on Jan 28, 2012 at 12:34 UTC | |
|
Re: More complicated regular expression?
by TomDLux (Vicar) on Jan 26, 2012 at 20:01 UTC |