gettin rid of

I want anything that isn't a letter or number to be taken out of a string.  Any ideas?  Thanks.
idadanAsked:
Who is Participating?
 
b2piConnect With a Mentor Commented:
s/[^\da-zA-z]//g

Should do it.  \d is for digits, a-zA-Z specifies lowercase or uppercase.
0
 
ozoCommented:
or s/[\W_]//g, #which will get letters according to your locale
or tr/0-9A-Za-z//cd

0
 
idadanAuthor Commented:
Great, thanks for the help!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.