MatchRegex Deprecated
Deprecated. Use the **MatchRegexV2** script instead.
javascript · Common Scripts
Details
| ID | MatchRegex |
|---|---|
| Language | javascript |
| From Version | 5.0.0 |
| Tags | Utility |
README
Deprecated. Use the MatchRegexV2 script instead.
Extracts regex data from a given text. The script supports groups and looping.
Script Data
| Name | Description |
|---|---|
| Script Type | javascript |
| Tags | Utility |
Inputs
| Argument Name | Description |
|---|---|
| data | The text date from which to extract the regex. |
| regex | The regex to match and extract. |
| group | The matching group to return. If no group is provided, the full match will be returned. The group value should start at 1. |
| contextKey | The context key to populate with the result. |
| flags | The regex flags to match. The default is “-gim”. |
Outputs
| Path | Description | Type |
|---|---|---|
| MatchRegex.results | List of regex matches. | string |
commonfields: id: MatchRegex version: -1 name: MatchRegex script: '' type: javascript tags: - Utility comment: Deprecated. Use the **MatchRegexV2** script instead. enabled: true args: - name: data required: true default: true description: The text date from which to extract thee regex. - name: regex required: true description: The regex to match and extract. - name: group description: The matching group to return (if not provided the full match will be returned), group value should start at 1 - name: contextKey description: The context key to populate with the result. - name: flags description: The regex flags to match. Default is -gim. defaultValue: outputs: - contextPath: MatchRegex.results description: List of regex matches. type: string scripttarget: 0 deprecated: true tests: - No test - deprecated. use MatchRegexV2 fromversion: 5.0.0