by Admin » Tue Sep 22, 2020 1:21 am
This has been added to version 3.4.1.0
Replace (3)
Replacement. It allows you to replace occurrences of one text string with another.
This section consists of two controls. You must specify the text you wish to Replace and the text you wish to replace it With. It is possible to find a text string and replace it with an empty string, or with a shorter string, or with a longer string. You may also specify whether or not you want the "find" to be case-sensitive using Match Case. Note that the text is always replaced with the text you specify, including any specific text case.
Multiple replacements can be specified using the | separator. For example, Replace:1|2 With:3|4 will replace 1 with 3 and 2 with 4. Replace:1|2 With:3 will replace 1 with 3 and 2 also with 3. If you need to use | as a character itself for renaming, then escape it with a \. For example, Replace:1\|2 With:3 will replace 1|2 with 3, the character | will not be used as separator.
· Match Case - Perform case-sensitive replacement.
· First - Replace only first match.
To replace only the First, Last, Start, End, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth match, use the position \modifier\ , for example:
Replace: \first\a - With: b - This will replace only the first a in the name with b.
The position modifier has to be specified between two \ at the start of the replace string. The following positions are supported:
\first\ , \last\ , \start\ , \end\ : replaces only first match, last match, at start of name, at end of name.
\second\ , \third\ , \fourth\ , \fifth\ , \sixth\ , \seventh\ , \eighth\ , \ninth\ : replaces only nth match.
Example: Replace: \last\text - With: - This will replace only the last 'text' with an empty string, i.e. it will be removed.
Example: Replace: \start\text - With: txt - This will replace 'text' with 'txt' only at start of name.
Example: Replace: \second\text - With: txt - This will replace only the second match of 'text' with 'txt'.
Note: It is also possible to use the tag <clip> in both the Replace and With fields. <clip> will be substituted with the current text content of the Windows Clipboard.