From: Jeremy Tregunna Date: 2006-07-22T07:15:06+09:00 Subject: Re: Newbie Question: delete all non alphanumeric characters On 21-Jul-06, at 4:44 PM, Tom Werner wrote: > Jeremy Tregunna wrote: >> >> And it should look like this: >> >> "567576hgjhgjh&**)".sub(/[^0-9a-zA-Z]+/i, '') >> >> Note the + >> > > #sub only does one replacement; adding a + will replace one chunk > of non-alphas, but not any others in the string. typo, sorry. > Tom -- Jeremy Tregunna jtregunna@blurgle.ca "One serious obstacle to the adoption of good programming languages is the notion that everything has to be sacrificed for speed. In computer languages as in life, speed kills." -- Mike Vanier