Repalce All
Is a keyword that replaces the value of a parameter with a new string cut from the value of that parameter
Platform
Web, Android, iOS, Windows, JavaSwing, Api, JDBC
Attribute
| Attribute | Data source | Recommended |
|---|---|---|
| Value: is the value that needs to be replaced Usually the result returned by a keyword Get text, Get attribute... | Variable | String |
| Regex: regular expression, sets up a structure to get data from the value of the selected parameter A regex can include multiple groups, each group is surrounded by () | Value | String |
| Replacement: is the position of the data string to be retrieved on the structure of the regex, replacing the value of the original parameter. To select a data group, use $ + the position of the group on the regex | Value | String |
| Output: is the return value of the keyword islist is false | newVariable | String |
| Value: is the value to be replaced. Usually the return result of a keyword Get text, Get attribute... | Variable | String |
Use cases
Use when you need to take a special string in an existing string and replace the entire original string
Example
The original string is: VND
Regex: ([0-9]),([0-9]3).* represents a string that includes a group with the value of where:
group only includes numbers from 9
group only includes numbers and has characters
between groups is a ","
Replacement:
$
$0