string remove characters without having a line of code to remove each type

Posted on 2012-09-18
Last Modified: 2012-09-18
Is there a way to remove characters such as:  - / \ ( ) , ;
without having to write a line of code like the one below for each type of character?

strString = strString.replace("/","")

Open in new window

Question by:McGurk1

    Accepted Solution

    Got it at this link:

    strString = Regex.Replace(strString, "[-(?*"",\\<>&#~%{}+_.@:\/ !;]+", "")

    Open in new window


    Author Closing Comment

    no points - found it at another site.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    I'm currently working for a company where I have to upgrade over 50 VB6 programs to VB.NET 2008.  So far I'm about half way through, and I've learned quite a few tricks that drastically improve the performance of VB.NET apps. Because there are a…
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    737 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

    22 Experts available now in Live!

    Get 1:1 Help Now