Page 1 of 1

Replace In A String

Posted: 07 Jul 2012 14:07
by micha_he
I have a String like "(abcdef)" in the selection. I would like replace the "(" with an empty string with a scriptpart like this:

Code: Select all

MoveStr = Document.SelText;
ShowMessage(MoveStr);
MoveStr = ScriptUtils.WStringReplaceAll(MoveStr, "(", "");
ShowMessage(MoveStr);
But nothing is replaced. Why ? Who is it correct ?

Re: Replace In A String

Posted: 07 Jul 2012 14:27
by pjj
Seems like it doesn't want to use empty string as a replacement at all. No idea how to circumvent it, though.