For regular expressions SearchReplace.js script uses JScript syntax, TextReplace.js script uses AkelPad syntax.InFive wrote:Hence the question - in SearchReplace.js script, I'm used to, in the field With, write $1 for a group. in TextReplace.js script, I have to use inclined \ -it turns out that the TextReplace.js script does not support advanced regular expression syntax, or I have something mixed up?
So you should use:
\0 - entire matched text,
\1 - first captured substring in parentheses,
\2 - second captured substring,
etc.
If "Replace with function" is checked, in function body ("With") you should use:
_s0 - entire matched text,
_s1 - first captured substring in parentheses,
_s2 - second captured substring,
etc.
See description in TextReplace_function.js script.InFive wrote:такой вопрос - функции, которые можно использовать в скриптах по поиску/замене - есть справочная инфа, как использовать такие функции в таких скриптах? и где брать такие функции?
то есть, хочу научиться использовать функции в скриптах по поиску/замене... что может научить?