Solved

gettin rid of

Posted on 1998-06-22
3
210 Views
Last Modified: 2010-03-05
I want anything that isn't a letter or number to be taken out of a string.  Any ideas?  Thanks.
0
Comment
Question by:idadan
3 Comments
 
LVL 5

Accepted Solution

by:
b2pi earned 20 total points
Comment Utility
s/[^\da-zA-z]//g

Should do it.  \d is for digits, a-zA-Z specifies lowercase or uppercase.
0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
or s/[\W_]//g, #which will get letters according to your locale
or tr/0-9A-Za-z//cd

0
 

Author Comment

by:idadan
Comment Utility
Great, thanks for the help!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now