From: Logan Capaldo Date: 2006-07-23T01:13:40+09:00 Subject: Re: Newbie Question: delete all non alphanumeric characters On Jul 21, 2006, at 6:15 PM, Jeremy Tregunna wrote: > > 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. Speaking of typos, say either a-zA-Z or a-z/i, you don't need both > >> 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 > >