SDLRename Advanced Mode | |||||||||||||||||||||||||||||||||||||
See also: User Interface, Replacement Mode, Insertion Mode, Introduction, Date/Time Format | |||||||||||||||||||||||||||||||||||||
Advanced ModeIn many cases simple search and replace operations are not sufficient. More complex replacements in filenames can be accomplished using regular expressions for substring matching and algorithmic replacement/insertion for changing the selected filenames. Thus the advanced mode of SDLRename offers these features: you specify a regular expression (the search expression) which is matched against the filename. If a match is found you can use the matched substrings (corresponding to the regular expression tokens) and apply them in the replacement clause.
The replacement expression may be any character string and may contain any number of place holders for the first 9 regular expression tokens of the search expression. The place holders are identified by the character combination @n, with n being a number between 1 and 9 (a double @character in the replacement string has to be used for inserting @ characters). In addition, the replacement token may be modified by a preceding replacement modifier. Replacement Modifiers Modifiers have to precede the replacement token and are only valid for this particular token. Replacement substrings addressed by the @-syntax may be modified before reinserting it into the destination name by the following modifiers:
Conditional Replacement In addition to the powerful regular expressions the replacement process may be controlled by a condition which is defined by a logical comparison of a particular token to a string. There are four possible conditions:
Algorithmic Insertions Apart from replacement tokens and modifiers, SDLRename allows to insert algorithmically generated substrings. These substrings are identified by matching angle brackets containing one of the following commands:
|