Page History
...
Pos | Name | Description |
---|---|---|
<1> | String | The actual substring matching the pattern. |
<2> | Pos | The starting position of the match within the original string. |
<3> | Length | The length of the match. |
<4> | Captures | An @VM delimited list of captured groups. (You can learn more about capturing groups here.) |
If you don't care about all this information and just want the matched string, use the Extract service instead.
Examples
Code Block | ||
---|---|---|
| ||
// find the phone number String = 'Call 800-555-1212 for info' Pattern = '((\d{3})(?:\.|-))?(\d{3})(?:\.|-)(\d{4})' Result = SRP_Regex("Search", String, Pattern) // we can get the whole number, or... PhoneNumber = Result<1> // we can get the parts because we captured them with parenthesis AreaCode = Result<4, 2> ExchangeCode = Result<4, 3> LineNumber = Result<4, 4> |
...