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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Dec 31, 2014, 7:35 AM
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.
Posted Dec 31, 2014, 6:08 AM
Sibeesh VenuPosted Dec 31, 2014, 4:03 AM
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/