in reply to Re^2: Match IP from 2nd line and Print Hostname from 1st line
in thread Match IP from 2nd line and Print Hostname from 1st line
Update: There is more than one way to write the regex. Another possibility would be (\S+) Changing one character (\w to \S) does a lot. That would match any non-whitespace character. So if some weirdo thing like "*" showed up, it would also be included. What you choose to implement depends both upon your actual data and personal preference.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Match IP from 2nd line and Print Hostname from 1st line
by ArifS (Beadle) on Aug 02, 2016 at 14:39 UTC |