0
ritika,
What you've posted looks like a hybrid between C# and javascript.
Regex.Replace is a C# method but the regular expressions (if you remove the surrounding quotes on the first one) look like javascript.
If you're trying to convert javascript to C#, can you post the original javascript please.