On 08/25/2006 04:26 PM, Jim Schueckler wrote:
Hi,
I need to remove all characters from a string except 'a'..'z', 'A'..'Z',
and '0'..'9'.
[...]

$newstring = $oldstring;
$newstring =~ s/[^[:alnum:]]+//g;

Everything that's not alphanumeric gets zapped to nothing.


HTH


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to