RE: replacing last 4 digits

2002-03-04 Thread Sethi, Pradeep
an [mailto:[EMAIL PROTECTED]] Sent: Monday, March 04, 2002 3:55 PM To: Pradeep Sethi Cc: [EMAIL PROTECTED] Subject: Re: replacing last 4 digits On Mar 4, Sethi, Pradeep said: >I have a number 342389842452. > >how do a substitute of everything with X but last 4 digits using regular &

Re: replacing last 4 digits

2002-03-04 Thread John W. Krahn
Pradeep Sethi wrote: > > Hi, > > I have a number 342389842452. > > how do a substitute of everything with X but last 4 digits using regular > expressions > > like 2452 $_ = 342389842452; s/\d*(\d{4})/$1/; print; John -- use Perl; program fulfillment -- To unsubscribe, e-

Re: replacing last 4 digits

2002-03-04 Thread Jeff 'japhy' Pinyan
On Mar 4, Sethi, Pradeep said: >I have a number 342389842452. > >how do a substitute of everything with X but last 4 digits using regular >expressions > >like 2452 You could take an approach like: s/\d(?=\d{4})/x/g; The (?=...) means "look ahead for ...". So this regex matches a dig

RE: replacing last 4 digits

2002-03-04 Thread Timothy Johnson
: [EMAIL PROTECTED] Subject: replacing last 4 digits Hi, I have a number 342389842452. how do a substitute of everything with X but last 4 digits using regular expressions like 2452 Thanks Prad -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

replacing last 4 digits

2002-03-04 Thread Sethi, Pradeep
Hi, I have a number 342389842452. how do a substitute of everything with X but last 4 digits using regular expressions like 2452 Thanks Prad -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]