Rano AH

Rano AH

  • NA
  • 176
  • 112.2k

Using Regex to omit and replace special charecters

Aug 21 2013 9:10 AM
Hi Sunny kumar

using Regex, I need to do the following:

Replacing * with X when found

omit / when found in

- _ are allowed

Upper case and Lower case are allowed

Numerical format and alphanumeric format are  allowed

Do I need also to use RegexOptions.None instead of the following? I still cannot understand Regex very well :-(  but I keep trying

Regex regex = new Regex("(?:[^]|(?<=['\"])s)", RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Compiled);


Answers (4)