Delete matches Version 5 (Java)

Action group: Text


Description

Removes the specified text from the source text

Action icon


Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Source textText to make action onRobin.String
Yes
The substring to be deletedThe substring to be deletedRobin.String
Yes
Apply to allIf the parameter value is True, then all found matches will be deleted. Otherwise, only the first fragment found. The default is «false».Robin.BooleantrueNo
Case sensitiveIf the parameter value is True, then the search for matches will be case-sensitive. The default is «false».Robin.BooleantrueNo
Results
ResultA string variable containing the processed text.Robin.String

Special conditions of use

None.

Example of use

Task 

There is a variable "Introductory text" with the value: "Robot 1. Robot 2. Robot 3. " It is required to output in the dialog box the value: "1.2.3."

Solution

Use the actions "Delete matches", "Show message". 

Implementation

  1. Create a variable with the type string "Text variable" into which the result of the "Remove matches" action will be written. 

  2. Move the "Delete matches" action to the workspace and set its parameters. 


  3. Move the "Show message" action to the workspace and set its parameters. 


  4. Launch the robot using the "Start" button in the top panel. 

Result

The required value is displayed in the dialog box 


  • Нет меток