Skip to main content

@terascope/utils / regex

regex

Functions

formatRegex()

formatRegex(input, flags?): RegExp

Parameters

ParameterType
inputstring | RegExp
flags?RegexFlag[]

Returns

RegExp

Source

packages/utils/src/regex.ts:35


isRegExp()

isRegExp(input): input is RegExp

Parameters

ParameterType
inputunknown

Returns

input is RegExp

Source

packages/utils/src/regex.ts:3


isRegExpLike()

isRegExpLike(input, strict): boolean

Parameters

ParameterTypeDefault value
inputunknownundefined
strictbooleantrue

Returns

boolean

Source

packages/utils/src/regex.ts:12


isWildCardString()

isWildCardString(term): boolean

Parameters

ParameterType
termstring

Returns

boolean

Source

packages/utils/src/regex.ts:95


match()

match(regexp, value): string | null

Parameters

ParameterType
regexpstring | RegExp
valuestring

Returns

string | null

Source

packages/utils/src/regex.ts:50


matchAll()

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

Parameters

ParameterType
regexpstring | RegExp
valuestring

Returns

string[] | null

Source

packages/utils/src/regex.ts:67


matchAllFP()

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

A functional version of matchAll

Parameters

ParameterType
regexpstring | RegExp

Returns

Function

Parameters
ParameterType
valuestring
Returns

string[] | null

Source

packages/utils/src/regex.ts:91


matchFP()

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

A functional version of match

Parameters

ParameterType
regexpstring | RegExp

Returns

Function

Parameters
ParameterType
valuestring
Returns

string | null

Source

packages/utils/src/regex.ts:63


matchWildcard()

matchWildcard(wildCard, value): boolean

Parameters

ParameterType
wildCardstring
valuestring

Returns

boolean

Source

packages/utils/src/regex.ts:137


wildCardToRegex()

wildCardToRegex(term): RegExp

Parameters

ParameterType
termstring

Returns

RegExp

Source

packages/utils/src/regex.ts:101