I'm trying to make a simple find and replace function but am having problems with the output report. It's important the user gets an output report telling them what was found and what it was replaced with.
If I try to get the output window to show what's in sReplacedNote it literally gives me back the string with out the replacement groupings (So I still get $1 and $2 instead of what's in those groups).
Can anyone point out what I'm doing wrong?
Thanks,
Max
Code: Select all
var sFound= '(<\/end><first><second{1} id=".*?"><note>)([\\s\\S?]+?<para>)';
var sReplacedNote= '$1<para level="4" change="add" rfc="statement">' + sReplaced+ '</para>$2';
if (sFirstStep){
UltraEdit.activeDocument.top();
UltraEdit.activeDocument.findReplace.replace(sFound,sReplacedNote);
}
Can anyone point out what I'm doing wrong?
Thanks,
Max