RE: Regrex substitution!!!

2001-07-12 Thread Bradley M. Handy
x';# after regexp The '+' was telling PERL to group as many numbers as it could into one substitution. Brad > -Original Message- > From: darren chamberlain [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 12, 2001 12:30 PM > To: [EMAIL

Re: Regrex substitution!!!

2001-07-12 Thread darren chamberlain
Fernando <[EMAIL PROTECTED]> said something to this effect on 07/11/2001: > I have a credit card number that I want to change to email a > reciept to the customer. This is that I want: > > I have this number: e.j. 8578 596 8552 > I want to convert all the number to "x" like that xxx xxx

Re: Regrex substitution!!!

2001-07-11 Thread Dwalu Z. Khasu
Now that I've thought about it, try 's/\d/x/g;' -- '+' is unnecessary and this should work as you want -- - Dwalu .peace -- I am an important person in this world - Now is the most important time in my life - My mistakes are my best teachers - So I will be fearles

Re: Regrex substitution!!!

2001-07-11 Thread Dwalu Z. Khasu
How about 's/\d+?/x/g;' - Dwalu .peace -- I am an important person in this world - Now is the most important time in my life - My mistakes are my best teachers - So I will be fearless. - Student Creed On Wed, 11 Jul 2001, Fernando w

Re: Regrex substitution!!!

2001-07-11 Thread Brett W. McCoy
On 11 Jul 2001, Randal L. Schwartz wrote: > Brett> $num =~ tr/[0-9]/x/; > > Why are you changing square brackets to x as well? Got something against > square brackets? My mistake. My apologies to the square brackets. -- Brett http://www.chapelperilous.net/bt

Re: Regrex substitution!!!

2001-07-11 Thread Brett W. McCoy
On Wed, 11 Jul 2001, Fernando wrote: > I have a credit card number that I want to change to email a reciept to the >customer. This is that I want: > > I have this number: e.j. 8578 596 8552 > I want to convert all the number to "x" like that xxx > > when I use this: > > $number =

RE: Regrex substitution!!!

2001-07-11 Thread Stout, Joel R
1 8578 596 8552"; my @card = split(" ", $number); for my $a (0..2) { $card[$a] =~ s/\d/x/g; } print @card; -Original Message- From: Guilherme Pinto [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 11, 2001 2:32 PM To: 'Fernando'; [EMAIL PROTECTED] Subject: R

RE: Regrex substitution!!!

2001-07-11 Thread Guilherme Pinto
> $number = " 8578 596 8552"; > $number =~ s/\d+/x/g; $number = " 8578 596 8552"; $number =~ s/\d/x/g; Try without the quantifier for the digit class. > -Original Message- > From: Fernando [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 11, 2001 5:31 PM > To: [EMAIL PROTEC