Find/Replace example

Let's edit a simple Web-page and assign the <H1> heading the same text as the <TITLE> of the page.

This is the original text with the "<H1>Old caption</H1>" in it:
The original text of the web-page

Then we add three edit rules:

1. Find regular expression "<TITLE>(.*)</TITLE>" and mark the inner text as "TITLE text":
Edit rule to find the TITLE element
We use the regular expression ".*" notation here which means "any number of any symbols".
The parentheses are needed to remember this subexpression and refer to it later.

See the Regular Expressions Syntax for reference.

2. Find regular expression "<H1>(.*)</H1>" and mark the inner text as "H1 text":
Edit rule to find the H1 element

3. Replace text marked as "H1 text" by another text marked as "TITLE text":
Edit rule to replace H1 value with the TITLE

Now the the Edit Rules window contains three rules:
Edit rules list

It is time to start our little program and see the result.
Click "Step" button twice and the first two rules will be executed.
The text found in the file is now shown on the Data View window and you can highlight it by double clicking the data piece:
TITLE and H1 found in file

Click "Step" once more and the "H1" text will be replaced:
H1 in file got replaced

Now the Edit Rules window shows that all rules were applied and you can hit "Reset":
Edit rules applied

After pressing "Reset" we finish executing edit rules and all data pieces disappear.

There is a button "Pass" that executes all rules to the end and stops so that you can examine the Data View; and there is a button "Run" that executes all edit rules and resets so that no data left and you only need to save the result.