replace

Replaces existing text on a page with a new text.  

Syntax

To replace specified text.

replace [from=]FromText, [to=]ToText

 

To replace pattern and value of an anchor (which was previously defined)

replace target=AnchorName, [to=]ToText

Parameters

FromText

Text to replace. Explicit or implicit (first position)

ToText

New text.  If empty sting FromText is deleted.  Explicit or implicit (second position)

AnchorName

Name of the anchor specified in anchor command

Notes

Examples

Add a value of variable after from text.

replace “User:”, “User: ${UserName}”

replace to=“User: ${UserName}”, from=“User:”

Replace anchor text.

anchor  pattern=”Date=${}”

replace target=Date, ${comp.$date}

Replace anchor text using FromText  format (same as above)

anchor  pattern=”Date=${}”

replace ${Date.text}, ${comp.$date}

Syntax legend
 

Format

Meaning

Italic

Information that the user must supply
 

Bold

Elements that the user must type exactly as shown.

Between brackets ([])

Optional items
 

Ellipsis (...)

Parameter that can be repeated several times