Skip to main content

$$match

Returns a matched substring from input by a pattern (and optionally group id)

Usage​

{ 
"$$match": /* Input string */,
"pattern": /* string */,
"group": 0 /* integer */
}
"$$match(<pattern>,[group]):{input}"
note

Concrete values in the usage example are default values.

Returns​

string

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimarystringYesInput string
patternstringYesRegular expression to match and extract from input string
groupinteger0The group id to get

Examples​

Input

Definition

Output

"hello"
"$$match([le]):$"
"e"
"hello"
"$$match([le]+):$"
"ell"
"hello"
"$$match(hell):$"
"hell"
"hello"
"$$match(hello$):$"
"hello"
"hello"
"$$match(hell$):$"
null
"world"
"$$match('w(\\\\w+)d',1):$"
"orl"