}
return replacedMatches;
}
private void replaceAllInScript(Script script, TextSearchParameters searchParams, List<ScriptMatch> bin) {
SearchAndReplaceTextTarget text = createTextTargetForScript(script);
List<TextSearchMatch> replacedOccurrances = text.replaceAll(searchParams);
if (!replacedOccurrances.isEmpty()) {
for (TextSearchMatch textMatch : replacedOccurrances) {
bin.add(new ScriptMatch(script, scripts, textMatch));
}
handleReplace(script, text);