String Operations

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > String commands > !STR.- String Command >

String Operations

STR.Remove

Previous Top Next


MiniRobotLanguage (MRL)

 

STR.Remove

Removes Specified Substrings from a String

 

clip0850

Decide which unnecessary Substrings you want to remove.

 

Intention

 

 This command is used to remove all occurrences of a specified substring from the source string.

The command is case-sensitive.

If the match string is not present in the source string, the source string is returned intact.

 

 

 

 

Syntax

 

 

STR.Remove|P1|P2[|P3]

 

 

 

Parameter Explanation

 

P1 - (Source String) The main string from which to remove substrings.

P2 - (Match String) The string containing the substring to be removed.

P3 - (Optional) Variable for the result. If omitted, the result is placed in P1.

 

 

 

Example

 

'***********************************

' IRS.-Sample

'***********************************
$$SRC=<abc123abc123>

$$MAT=<abc>

STR.Remove|$$SRC|$$MAT|$$RES

' $$RES will contain "123123"

ENR.

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also: