$$test
Checks if a string matches a certain pattern
Usage​
{
"$$test": /* String to test */,
"pattern": /* string */
}
"$$test(<pattern>):{input}"
Returns​
boolean
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | string | Yes | String to test | |
pattern | string | Yes | Regular expression to match against input string |
Examples​
Input
Definition
Output
"hello"
"$$test([le]):$"
true
"hello"
"$$test(hell):$"
true
"hello"
"$$test(hello$):$"
true
"hello"
"$$test(hell$):$"
false
"hello"
"$$test('^hello$'):$"
true
"hello"
"$$test('^(hello|world)$'):$"
true
"HELLO"
"$$test('^hello$'):$"
false
"HELLO"
"$$test('(?i)^hello$'):$"
true