PhixFlow Help

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Function: firstMatch()

Returns the value of the first element of an Array that matches a Regular Expression.

Syntax

firstMatch(array, regExp)

ArgumentTypeDescription
arrayArrayAn array of Strings or Numbers
regExpRegular ExpressionA numeric or string-based regular expression.

Examples

firstMatch(["JOHN", "FREDDY", "FRANK"], "^[FR].*")

Returns the first string beginning with "FR" i.e "FREDDY".

firstMatch([99, 166, 27], "<90 | 150..200")

Returns the first number which is lower than 90 OR between 150 and 200 i.e. 166.

See Also

  • No labels