how i can Replace those string in C#
I need //cursive// text and //cursive// text.
INTO:
I need <i>cursive</i> text and <i>cursive</i> text.
AND
This si me [website[http://www.website.com]] and other me [website[http://www.website2.com]].
INTO:
This si me <a href='http://www.website.com'>website</a> and other me <a href='http://www.website2.com'>website</a>.
Solutiuon for first act:
string Test = "Mama ma //hodne// prace protoze //neni// doma.";
string Result = Regex.Replace(Test, "//(.+?)//", "<i>$1</i>");
Solution for second act:
string Test2 = "Mama ma [hodne[http://www.someurl.com]] protoze [neni[http://www.someurl.com]] doma.";
string Result2 = Regex.Replace(Test2, "\\[(.+?)\\[(.+?)\\]\\]", "<a href='$2' target='_blank'>$1</a>");