REGEXP Plugin v1.0 beta 2 for Sophisticared Rename 1.7.
Written by Andrew Andreenkov (e-mail: aav[at]

This plugin includes the following components:

TRegExpr (Andrey V. Sorokin,,
KEY OBJECTS LIBRARY for Delphi (Vladimir Kladov,,

Purpose: The plugin allows you to use regular expressions in Sophisticated Rename. A short desctiption of regular expressions can be found in RegExp-eng.htm.

Function name: RX.


RESULT - resulting string.
$1, $2, ... - last found substrings.


INPUT - a string to process. Default is "*XVR FILE NAME" (name without extension).
SEARCH - search template.
REPLACE - replace template.
MODIFIERS - regexp modifiers. Default modifiers are I, G, R, D.
CONFIRM - Require confirmation (True or False). Default state is "False". When "True", a confirmation window will be shown each time the plugin is called to process a group of files. It will be also shown when INPUT parameter is not specified.
VARNAME - a name of a regexp-preset to save the parameters of the processing. If this parameter is given, you will see a dialog window during the first start of the plugin. If you check "Don't show this dialog again", the parameters will be saved and the dialog window will not be shown next time if you call the plugin with the same regexp-preset name.

Note: SR uses "|" to separate keys in the parameters line. That's why you must use "||" if you want to use "|" as a part of a key value". For example, the expression "(2|3)" should be written as "SEARCH=(2||3)". Use this rule only in parameters line and don't use it in confirmation dialog window, where "|" should not be changed to "||".

Examples: You will find two examples for this preset.

1. Lesson-4a
Almost the same as Lesson-4 from the Sophisticated Rename distributive pack:

Beaver13 Apr 2001 beaver's hut - animals.jpg =>
2001-apr-13 [Animals] Beaver (Beaver's Hut).jpg
Moon-9 Dec 1998-very dark - nature.jpg =>
1998-dec-9 [Nature] Moon (Very Dark).jpg
Sombody's birthday 10 Feb 2004poor quality - my friends.jpg =>
2004-feb-10 [My Friends] Sombody's Birthday (Poor Quality).jpg

2. Lesson-4b
This example uses both regular expressions and SR conditions. The result is the same as in Lesson-4.