Works great, but how I keept the spaces?<br><br><br><br><div><span class="gmail_quote">On 10/3/06, <b class="gmail_sendername">Miles Crawford</b> <<a href="mailto:mcrawfor@u.washington.edu">mcrawfor@u.washington.edu</a>
> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br>Crap!<br><br>How about this instead:<br><br>$foo = 'string\' with
b@d `chars';<br><br>$foo =~ s/[^a-z0-9]//ig;<br><br>I forgot the 'g' - the first one only removed the first bad char.<br><br>You may also want to add a ' ' to the a-z0-9 bit to preserve spaces.<br><br>-miles<br><br><br><br>
<br>On Tue, 3 Oct 2006, Miles Crawford wrote:<br><br>><br>><br>> Luis,<br>><br>> Try something like this:<br>><br>><br>> $foo = 'string\' with b@d `chars';<br>><br>> $foo =~ s/[^a-z0-9]//i;<br>
><br>> But read <a href="http://perldoc.perl.org/perlre.html">http://perldoc.perl.org/perlre.html</a> first ;)<br>><br>> -miles<br>><br>><br>> On Tue, 3 Oct 2006, luis medrano wrote:<br>><br>>> List,
<br>>><br>>> I need to remove this character ' but I'm using linux if I copy paste<br>>> it will show something like this â. any idea how can I fix this or<br>>> how can I just remove everything except numbers and letters?
<br>>><br>>> Thanks,<br>>> luis<br>>> _____________________________________________________________<br>>> Seattle Perl Users Group Mailing List<br>>> POST TO: <a href="mailto:spug-list@pm.org">
spug-list@pm.org</a><br>>> SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list">http://mail.pm.org/mailman/listinfo/spug-list</a><br>>> MEETINGS: 3rd Tuesdays<br>>> WEB PAGE: <a href="http://seattleperl.org/">
http://seattleperl.org/</a><br>><br></blockquote></div><br>