rxpos()

Function group Execute on client Platform(s)
String NO All

Syntax

rxpos(rx,str,igncase,words,mchlen)

Description

Returns position of characters matching regular expression rx in str, or zero for no match; sets mchlen to length of match. igncase and words are Boolean, true for ignore case or only match whole words.

Regular Expressions

The function supports regular expressions using the following metacharacters:

Metacharacters Action
^ Beginning of line
$ End of line
| Or
[abc] Match any character enclosed in the brackets.
[^abc] Match any character not enclosed in the brackets.
[a-z] Match the range of characters specified by the hyphen.
. Match any single character.
( ) Group the regular expression within the parentheses.
? Match zero or one of the preceding expression.
* Match zero, one, or many of the preceding expression.
+ Match one or many of the preceding expression.
\ Escape the metacharacter that follows so that the literal meaning of the character is used.
& Reference the entire matched text for string substitution.
\n Reference subgroup n within the matched text (n can be 1-9).

The function does not support the following features:

Word boundaries
the \< begin word and \> end word metasequences.

Back references
the \n notation, which lets you reference a previously matched group.

Repetitions
the {min,max} metasequence that specifies a minimum and maximum repetition of a regular expression.