RE:help on Regex

2001-11-27 Thread Hasanuddin Tamir
On Tue, 27 Nov 2001, Jorge Goncalvez <[EMAIL PROTECTED]> wrote, > Hi I have this: > > my $ip="192.40.54.41"; > > $ip=~ s/(\d+\.\d+)\.(\d+\.\d+)/$1\.0/; > > print $ip; > > But It didn't work it displays 192.40.0 and I wanted to display 192.40.54.0. > Why? thanks. The first parentheses (refere

RE:help on Regex

2001-11-27 Thread Jorge Goncalvez
Hi I have this: my $ip="192.40.54.41"; $ip=~ s/(\d+\.\d+)\.(\d+\.\d+)/$1\.0/; print $ip; But It didn't work it displays 192.40.0 and I wanted to display 192.40.54.0. Why? thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]