Eluent Replace Mini-Tour: The Replace Rule Editor
Below, the Eluent Replace Rule Editor displays the
second Replace Rule
from the preceding page. The Find and Replace with windows
are multi-line editors, and you can search and replace multiple lines of
text.

The check boxes at the bottom of the window correspond to the
options available in the Replace Rule List. Several of the options are
specific to the Perl programming language:
| Option |
Meaning |
| Legible RegEx |
This is Perl's /x
search modifier. It causes most whitespace to be ignored in
regular expressions, allowing you to format your regex neatly
over several lines. It also allows you to write comments within
your regex. |
| Dot matches NL |
This is Perl's /s
search modifier. Normally, the special character, dot
(AKA period), matches all characters except
newline (ASCII 10). Selecting this check box causes dot
to match newlines as well. |
| Double-quote search
text |
Selecting this
check box causes Eluent Replace to enclose your search text in
double quotes, so that Perl will interpolate it, replacing
variables such as $var with their current
values. You could use this with a Prologue Script to build a
regular expression out of variables defined in your Prologue
Script. |
| Eval replacement
text |
This is Perl's /e
modifier. It causes the replacement text to be evaluated as Perl
code. For example, if you wanted to convert all letters to lower
case, you could select this check box and replace (\w+)
with lc($1). (lc is a
built-in Perl function that converts its argument to lower
case.) While this is a very simple example, your replacement
text can be a complex Perl program that makes use of other Perl
features and whatever variables and functions you've defined in
your Prologue Script, if any. |
<< Back |