Re: How to remove trailing zero

2004-10-25 Thread John W. Krahn
Khairul Azmi wrote: Can somebody help me how to remove the trailing zero from an ip address $ip_add = 010.200.020.000; The output should be 10.200.20.0; I''ve been trying many regex techniques but still unsuccessful. $ perl -le'$_ = 010.200.020.000; print; s/\b0+(?=\d)//g; print' 010.200.020.000

How to remove trailing zero

2004-10-24 Thread Khairul Azmi
Can somebody help me how to remove the trailing zero from an ip address $ip_add = 010.200.020.000; The output should be 10.200.20.0; I''ve been trying many regex techniques but still unsuccessful. Thanks Azmi -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: How to remove trailing zero

2004-10-24 Thread Chris Devers
On Mon, 25 Oct 2004, Khairul Azmi wrote: Can somebody help me how to remove the trailing zero from an ip address $ip_add = 010.200.020.000; The output should be 10.200.20.0; I''ve been trying many regex techniques but still unsuccessful. It's probably possible to do this other ways