ReplaceAny |
Top Previous Next |
Syntax - ReplaceAny <Variable Name> <Expression> <ArrayOfCharacters> <Replacement> [<SpecialCharacter1>] ... [<SpecialCharacterX>] Where: <Variable Name> is the user defined name that is assigned to the variable. <Expression> is a literal string or a variable that contains a literal string. <ArrayOfCharacters> is a literal string or a variable that contains a literal string. <Replacement> is a literal string or a variable that contains a literal string. <SpecialCharacters> are built in variables and non-printable characters such as &DoubleQuote, &Tab, &CR, &LF or &CRLF that are not able to be put inside the <ArrayOfCharacters>.
Description: This command is used to replace any occurrences of the characters in <ArrayOfCharacters> and/or any <SpecialCharacters> with the <Replacement> string that are found in the <Expression> string. The resulting literal string is store as the <Variable Name>.
Note: If the <Replacement> is an empty string (""), the literal string stored as <Variable Name> will be the <Expression> with any occurrence of the characters listed in <ArrayOfCharacters> or <SpecialCharacters>removed. If the <ArrayOfCharacters> is an empty string ("") and there are no <SpecialCharacters>, the literal string stored as <Variable Name> will be the original <Expression>.
Sample 1: The following statement uses ReplaceAny to remove all exclamations, pipes and ampersands from a description and store the results as the variable NewDescription. ReplaceAny NewDescription Description "!|&" ""
Sample 2: The following statement uses ReplaceAny to remove all double quotes from a variable called PatientName and store the results in the same variable. ReplaceAny PatientName PatientName "" "" &DoubleQuote
Sample 3: The following statement uses ReplaceAny to remove all carriage returns and tabs from a variable called ClaimDesc and store the results in the same variable. ReplaceAny PatientName PatientName "" "" &CR &Tab
|