Remove characters from string

S

Shapper

Hello,

I need to remove the characters { '/', '@', '+', ... } from a string.

I could use String.Replace but then I might have a lot of chained replaces.

What is the best way to do this?

Thank You,
Miguel
 
A

Arne Vajhøj

I need to remove the characters { '/', '@', '+', ... } from a string.

I could use String.Replace but then I might have a lot of chained replaces.

What is the best way to do this?

If best means simplest code, then I would say Regex.Replace!

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top