Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?



The REGEXP function is a powerful function that allows pattern matching using UNIX regular expressions. REGEXP is not supported on Windows. It takes the general form:

REGEXP(variable, expression)


  • variable can be any type of jBASE BASIC 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.

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.

An example of use would be: 

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

to display the value 4, being the position of the character "t" in the word Software

Go back to jBASE BASIC.

Was this article helpful?