Description |
Finds and replaces each or every occurrence of a text pattern and places the result into a variable. Regular expressions may be used for added power and flexibility. Used to find and replace a word or phrase inside of a larger piece of text. |
Declaration |
<AMREPLACE TEXT="test" FIND="test" REPLACE="test" RESULTVARIABLE="text [variable name]" USERE="YES" USECASE="YES" INDEX="6" MAXMATCHES="6" TOTALMATCHESVAR="text [variable name]"> |
Example |
<AMVARIABLE NAME="sourcedata">Automated
Workflow Version 5.5 Adds Power, Speed, Flexibility and Intelligence.</AMVARIABLE> AFTER: %newdata%</AMMESSAGEBOX> |
General Tab Parameters |
Text: Specifies target text to be searched. Text, Required Find: Specifies the text to search for. text,Required Replace with: Specifies the text to replace the found text with. text,Required Case Sensitive: Specifies whether the search performed should be case sensitive. Yes/No, Optional (default: No) Regular Expression: Specifies whether the FIND parameter is a regular expression. If the option is no, the Find parameter contains literal text, if the option is yes, the find parameter contains a regular expression. Yes/No, Optional (default: No) Populate variable with result: Specifies the variable to receive the new text. Text [variable name], Required |
Advanced Tab Parameters |
Starting at the following instance: Specifies target text to be searched. Number, Optional (default: 1) Maximum Replacements: Specifies the maximum number of replacements that should be made. If 0(default) is specified, all instances of the found text will be replaced. Text [variable name], Optional (default:0) Total replacement Count into variable: Specifies the variable to receive the total number of replacements that were made. Text [variable name], Required |