I want to find the "(*" string in another string and then replace it with the < and / one but the method replace() can not do it. Sorry, but I can not write the string in the description together :D
Here is my code:
//Call the method like..
trace(searchandreplace("(*Foo)"));
private function searchandreplace(input:String):String{
var pattern:RegExp = /(*/gi;
return input.replace(pattern,"</");
}
Trace: //What I get:..
"(*Foo)"
Trace: //What I want...
"</Foo>"
It would be nice if someone can fix my problem.
Thanks in advance!