Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Stripping characters...

by fruiture (Curate)
on Mar 04, 2003 at 08:44 UTC ( #240273=note: print w/ replies, xml ) Need Help??


in reply to Stripping characters...

To create a complementary character class, use [^...], see perlre. In order to strip characters, tr/// is the better (=more efficient) choice:

$string =~ tr/a-zA-Z//cd;

See perlop for what tr///cd does.

--
http://fruiture.de


Comment on Re: Stripping characters...
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2015-07-03 21:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls