Re: is there be better way to write regex for

2005-05-18 Thread Manish Sapariya
Hi Ing, example u gave compiles well and after diffing your and my code it shows that the single quotes in my $ip = '((?:\d{1,3}\.){3}\d{1,3})' made the code compile. Thanks for the help. Regards, Manish On 05/18/2005 02:49 PM, Ing. Branislav Gerzo wrote: Manish Sapariya [MS], on Wednesday, May

Re: is there be better way to write regex for

2005-05-18 Thread Ing. Branislav Gerzo
Manish Sapariya [MS], on Wednesday, May 18, 2005 at 11:12 (+0530) typed: MS> Thats really neat way of writing the expression I was looking for. MS> But somehow I couldnt get the following compiled. It says heh, ok, this will work: #!/usr/bin/perl use strict; use warnings; my $a="1: 192.168.0.18

Re: is there be better way to write regex for

2005-05-18 Thread Manish Sapariya
I guess I am running into all sorts of problem with this program. Can any body please explain me the compilation error... syntax error at ./a.pl line 11, near "#if($a =~ /((?:" (Might be a runaway multi-line ?? string starting on line 8) Execution of ./a.pl aborted due to compilation errors.

Re: is there be better way to write regex for

2005-05-18 Thread Manish Sapariya
Hi, Thats really neat way of writing the expression I was looking for. But somehow I couldnt get the following compiled. It says Search pattern not terminated at ./a.pl line 8 1 #!/usr/bin/perl 2 3 use warnings; 4 use strict; 5 6 7 my $a="1: 192.168.0.180:32866

Re: is there be better way to write regex for

2005-05-18 Thread Manish Sapariya
Hi, Thats really neat way of writing the expression I was looking for. But somehow I couldnt get the following compiled. It says Search pattern not terminated at ./a.pl line 8 1 #!/usr/bin/perl 2 3 use warnings; 4 use strict; 5 6 7 my $a="1: 192.168.0.180:32866

Re: is there be better way to write regex for

2005-05-17 Thread Ing. Branislav Gerzo
Manish Sapariya [MS], on Tuesday, May 17, 2005 at 17:38 (+0530) has on mind: MS> echo "1: 192.168.0.180:32866 - 192.168.0.183:143 (a2b) MS> 17> 14< (complete)" | perl -lane 'print$_;if($_ =~ MS> /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(\d{1,5}) - MS> (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):(\d{1,5