REGEXP


The REGEXP function is a powerful function that allows pattern matching using UNIX regular expressions.  REGEXP is not supported on Windows.

 

COMMAND SYNTAX

REGEXP(variable, expression)

 

SYNTAX ELEMENTS

variable can be any type of jBC variable and is the variable upon which pattern matching will be performed.

expression should evaluate to a standard UNIX regular expression as defined in the UNIX documentation.

 

NOTES

The function returns a numeric integer value being the first character in variable that failed to match the specified regular expression. If a match is not found or the regular expression was invalid then the function returns 0.

 

EXAMPLE (UNIX only)

String = "jBASE Software Inc."
CRT REGEXP(String, "S[^t]*")

displays the value 4 being the position of the character "t" in the word Software.


jBC