Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: regexing for non-standard characters...

by rethaew (Sexton)
on Apr 15, 2010 at 23:44 UTC ( [id://834989]=note: print w/replies, xml ) Need Help??


in reply to regexing for non-standard characters...

Not exactly on topic, but frequently when I'm dealing with lots of old and weird files and data with characters that are killing my scipts or causing other behavior, I just eliminate all the characters I do not need. Faster than trying to pinpoint which character is causing the problem.
$string =~ s/[^A-Za-z0-9]//g;
If all I need is letters and numbers.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://834989]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-04-23 19:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found