Asif Iqbal wrote:
> Hi All
> 
> I am trying to relace any 7 digit number to to a new 7 digit number of
> which last two digits are 9
> 
> lets pick a random 7 digit number as 1347236.
> 
> so I want 1347236 --> 1347299 using perl
> 
> I can do it with sed 
> 
> NUMBER=1347236
> NUMBER=`echo $NUMBER | sed 's/\([0-9]\{5\}\)[0-9]\{2\}/\199/'`
> so now $NUMBER is 1347299
> 
> 
> Any help/suggestion would be greatly appreciated
> 

I got it, thanks for all the help

This is how I am doing it

s/([0-9]{5})[0-9]{2}/${1}99/

> -- 
> Asif Iqbal
> PGP Key: E62693C5
> There's no place like 127.0.0.1



-- 
Asif Iqbal
PGP Key: E62693C5
There's no place like 127.0.0.1

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to