Skip to main content

@terascope/utils / regex

regex

Functions

formatRegex()

formatRegex(input, flags?): RegExp

Defined in: packages/utils/src/regex.ts:35

Parameters

ParameterType
inputstring | RegExp
flags?RegexFlag[]

Returns

RegExp


isRegExp()

isRegExp(input): input is RegExp

Defined in: packages/utils/src/regex.ts:3

Parameters

ParameterType
inputunknown

Returns

input is RegExp


isRegExpLike()

isRegExpLike(input, strict): boolean

Defined in: packages/utils/src/regex.ts:12

Parameters

ParameterTypeDefault value
inputunknownundefined
strictbooleantrue

Returns

boolean


isWildCardString()

isWildCardString(term): boolean

Defined in: packages/utils/src/regex.ts:95

Parameters

ParameterType
termstring

Returns

boolean


match()

match(regexp, value): null | string

Defined in: packages/utils/src/regex.ts:50

Parameters

ParameterType
regexpstring | RegExp
valuestring

Returns

null | string


matchAll()

matchAll(regexp, value): null | string[]

Defined in: packages/utils/src/regex.ts:67

Parameters

ParameterType
regexpstring | RegExp
valuestring

Returns

null | string[]


matchAllFP()

matchAllFP(regexp): (value) => null | string[]

Defined in: packages/utils/src/regex.ts:91

A functional version of matchAll

Parameters

ParameterType
regexpstring | RegExp

Returns

Function

Parameters
ParameterType
valuestring
Returns

null | string[]


matchFP()

matchFP(regexp): (value) => null | string

Defined in: packages/utils/src/regex.ts:63

A functional version of match

Parameters

ParameterType
regexpstring | RegExp

Returns

Function

Parameters
ParameterType
valuestring
Returns

null | string


matchWildcard()

matchWildcard(wildCard, value): boolean

Defined in: packages/utils/src/regex.ts:137

Parameters

ParameterType
wildCardstring
valuestring

Returns

boolean


wildCardToRegex()

wildCardToRegex(term): RegExp

Defined in: packages/utils/src/regex.ts:101

Parameters

ParameterType
termstring

Returns

RegExp