I guess I should have written it like this then:
$string =~ s/\d+\s+//g; #one or more digits followed by one or more spaces -----Original Message----- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 5:05 PM To: Timothy Johnson Subject: RE: Get rid of digits... Tim, That worked well! Thank you but what if I have the string looking like this? $string = "08 2552 252 252 hello"; How would I go about removing all digits and all white spaces after the digits? Thx, Dan -----Original Message----- From: Timothy Johnson [mailto:[EMAIL PROTECTED]] Sent: Thursday, 21 February 2002 11:15 AM To: Daniel Falkenberg; [EMAIL PROTECTED] Subject: RE: Get rid of digits... Okay, looking at it more closely, I think what you have there removes all digits AND whitespace characters. Is that what you were trying to do? or were you looking for something more like this: $string =~ s/\d+\s//g; Which will remove one or more digits followed by one space (so you don't end up with a bunch of spaces). -----Original Message----- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 4:38 PM To: [EMAIL PROTECTED] Subject: Get rid of digits... Hey all, Just wondering what my best way would be to go about stripping all digits from my string. So far I have the follwoing... $string = "08 852365 21 Hello world!"; $string =~ s/[.*\d\s]//g; What does this do exactly? Regards, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------------------------------------------------------------------------ -------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -------------------------------------------------------------------------------- This email may contain confidential and privileged material for the sole use of the intended recipient. If you are not the intended recipient, please contact the sender and delete all copies. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
