In this Page
...
Description | Returns an array of results when matching a string against a regular expression object. This is similar to the JavaScript match. | ||
---|---|---|---|
Syntax |
| ||
Example | The argument to match() takes a string that will be interpreted as a regular expression. This enables you to create expressions such as the following to perform a global search to match strings in the employee code that contain actual employee ID values, followed by any five digits:
To match a whole word in a given variable called FirstName: Expression: $FirstName.match(/\bJohn\b/g) where \b sets the word boundary and looks for string 'John' in the incoming string variable called $FirstName Result: John |
...
Description | Returns a new string with text extracted from another string. If beginIndex is greater than or equal to the length of the string, an empty string is returned. If it is negative, it returns that many characters from the end of the string length. If This is similar to the JavaScript slice. | ||
---|---|---|---|
Syntax |
| ||
Example | Where $String contains "Copyright 2017 All rights reserved." Expression: $String.slice(10) Result: 2017 All rights reserved. Expression: $String.slice(10,14) Result: 2017 Expression: $String.slice(10,-2) Result: 2017 All rights reserve Expression: $String.slice(-2) Result: d. |
...