User`s guide
APPENDIX A Function Reference
User’s Guide 157
Parameters string pattern
A string describing a match pattern.
string text
A string to investigate.
Examples To compare values using pattern-matching:
uLike("% happy %", "A happy man.") // returns 1
uLike("% happy %", "A sad man.") // returns 0
uMatches
Description Returns true if a given string matches a regular expression.
Syntax number uMatches(input, regexpr)
Parameters
string text
A string to investigate.
string regexpr
Regular expression specification.
Examples To verify that a string can be interpreted as a floating number:
uMatches("abc","[-+]?[0-9]*\.?[0-9]*") // return 0
uMatches("1.23","[-+]?[0-9]*\.?[0-9]*") // return 1
Lookup functions
uChoice
Description Returns the Nth parameter value specified by index. The index value is zero-
based, so an index of zero returns the second parameter
Syntax string uChoice(index, values, ...)
Parameters
integer index
The index number referencing the return value. Zero based.