Re: Pattern Matching - Remove Alpha

2002-01-20 Thread Roger C Haslock
t: Saturday, January 19, 2002 12:28 AM Subject: Re: Pattern Matching - Remove Alpha > On Wed, Jan 16, 2002 at 09:51:45PM -0500, Tanton Gibbs wrote: > > Michael brings up a good point...for this problem, you would probably be > > better served by tr > > > > $stat =~ tr/a-z

Re: Pattern Matching - Remove Alpha

2002-01-18 Thread Michael Fowler
On Wed, Jan 16, 2002 at 09:51:45PM -0500, Tanton Gibbs wrote: > Michael brings up a good point...for this problem, you would probably be > better served by tr > > $stat =~ tr/a-zA-Z//d; > > will delete any alpha character. > > Although split will do the job, I think tr would be a more "idiomati

Re: Pattern Matching - Remove Alpha

2002-01-16 Thread John W. Krahn
Hewlett Pickens wrote: > > I am unable to use "split" with pattern matching to remove alpha characters > from a string and will appreciate a pointer on what I'm doing wrong. (Have > looked in "Learning Perl" and "Programming Perl" but can't spot my error.) > > The detail: > > "$stat" is a stri

Re: Pattern Matching - Remove Alpha

2002-01-16 Thread Michael Fowler
On Wed, Jan 16, 2002 at 05:38:56PM -0600, Hewlett Pickens wrote: > The detail: > > "$stat" is a string that has alpha and numeric data in it. > I want to remove all of the alpha and put the numeric data into an array. > > The first attempt: > >my @nums = split(/a-zA-Z/,$stat); # removes

RE: Pattern Matching - Remove Alpha

2002-01-16 Thread Wagner-David
002 15:39 To: [EMAIL PROTECTED] Subject: Pattern Matching - Remove Alpha I am unable to use "split" with pattern matching to remove alpha characters from a string and will appreciate a pointer on what I'm doing wrong. (Have looked in "Learning Perl" and "Programming Per

Pattern Matching - Remove Alpha

2002-01-16 Thread Hewlett Pickens
I am unable to use "split" with pattern matching to remove alpha characters from a string and will appreciate a pointer on what I'm doing wrong. (Have looked in "Learning Perl" and "Programming Perl" but can't spot my error.) The detail: "$stat" is a string that has alpha and numeric data in it