\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; ----- Original Message ----- From: "McCollum, Frank" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 07, 2002 2:52 PM Subject: substitute all non-digits with ''. I think I saw this posted rec ently, but I could not find it... > 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 > > > > Frank McCollum > Bank Of America Securities, LLC > [EMAIL PROTECTED] > (704) 388-8894 > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]