I have the following data I'm parsing:
How can I grab just 1 [111.123.164.80] [123.126.126.126]1 [111.123.164.80] [123.126.126.126] 87 000:00:00.0000.000.000 0 +6/07/2000 04:39:00 PM SNMP: Get
I was using :
... but this is grabbing the entire line.while (<DATA>) { if ($_ =~ /\d+\s+\[\d+\.\d+\.\d+\.\d+\]/) { print $_; } }
any ideas?
In reply to regex needed by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |