Tanton Gibbs wrote: > > From: "McCollum, Frank" <[EMAIL PROTECTED]> > > > > I want to take all non-digits and drop them out of my > > string. I would think it would be something like... > > > > s/!(\d+)//; but this is not the case > \D means anything that is not a digit, so > > $str = "AB123CD"; > $str =~ s/\D//g; > > will work. > > Also, you could use tr > > $str =~ tr/0-9//d;
The OP wants to remove non-digits so: $str =~ tr/0-9//cd; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]