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
&
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-
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
: [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
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]