Problem with restrict to lines not matching
Posted: Mon Aug 23, 2004 2:59 pm
I got a problem with restrict to lines not matching.
Restrict line not matching [ > ]
Sub filter Search & replace (Perl Pattern) :
Find pattern :
arp who-has (.*) tell (.*)
Replace
$2,$1,
Sample data:
arp who-has 10.20.1.19 tell bigswitch
linuxbox.50071 > domaincontroller.domain
The result is
,10.20.1.19,bigswitch
linuxbox.50071 > domaincontroller.domain
The result that I want is :
bigswitch,10.20.1.19,
linuxbox.50071 > domaincontroller.domain
Somehow $2 (bigswitch) and $1 (10.20.1.19) is being switched....
I couldn't figure out what's wrong.
Thanks
HR
Netmap Analytics
Restrict line not matching [ > ]
Sub filter Search & replace (Perl Pattern) :
Find pattern :
arp who-has (.*) tell (.*)
Replace
$2,$1,
Sample data:
arp who-has 10.20.1.19 tell bigswitch
linuxbox.50071 > domaincontroller.domain
The result is
,10.20.1.19,bigswitch
linuxbox.50071 > domaincontroller.domain
The result that I want is :
bigswitch,10.20.1.19,
linuxbox.50071 > domaincontroller.domain
Somehow $2 (bigswitch) and $1 (10.20.1.19) is being switched....
I couldn't figure out what's wrong.
Thanks
HR
Netmap Analytics