4
Reply

Using Regex to omit and replace special charecters

Rano AH

Rano AH

11 years ago
1.1k
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)