result = Regex.Replace(result, "/^\s*( )+/gi",/( |
]*>)+\s*$/gi);
]*>)+\s*$/gi);
this equivalent in c# ???
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sibeesh VenuRank #27 · 42.9K reputationPosted Dec 30, 2014, 11:03 PM EST
string pattern = @"/^\s*( )+/gi",/( |
]*>)+\s*$/gi";
Regex rgx = new Regex(pattern, RegexOptions.IgnoreCase);
http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regex%28v=vs.110%29.aspx
Kindest Regards
Sibeesh
http://sibeeshpassion.com/
Posted Dec 31, 2014, 1:08 AM EST
VulpesRank #55 · 29.2K reputationPosted Dec 31, 2014, 2:35 AM EST
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.