<< Click to Display Table of Contents >> Navigation: 3. Script Language > String commands > !STR.- String Command > String Operations |
MiniRobotLanguage (MRL)
STR.RetainAny
Retain Any Specified Characters in a String
Intention
This command is used to retain any characters in the source string that are present in a given match string.
All other characters are removed.
•The command is case-sensitive.
•If P2 is not present in P1, or either string parameter is empty, a empty string is returned.
Syntax
STR.RetainAny|P1|P2[|P3]
STR.Rta|P1|P2[|P3]
Parameter Explanation
•P1 - (Source String) The main string from which to retain characters.
•P2 - (Match String) The string containing characters to be retained.
•P3 - (Optional) Variable for the result. If omitted, the result is placed in P1.
Example
'***********************************
' STR.-Sample
'***********************************
$$SRC=<abc123>
$$MAT=<ac1>
STR.RetainAny|$$SRC|$$MAT|$$RES
' $$RES will contain "ac1"
ENR.
Remarks
-
Limitations:
-
See also:
•