Skip to main content

Countx

Countx (Function)​

Format​

countx ( haystack_string_expression , regular_expression )

returns integer_expression

Description​

Return the count of the regular expression regex in the string haystack.

Example​

print countx("Hello", "[hH]")
print countx("Buffalo buffalo buffalo.","[Bb]uffalo")

will display

1
3

Notes​

By default the nature of regular expressions is “greedy”. This behaviour can be changed using the RegexMinimal statement.

See Also​

Asc, Chr, Count, Countx, Explode, Explodex, Implode, Instr, Instrx, Left, Length, Ljust, Lower, LTrim, MD5, Mid, Midx, Replace, Replacex, Right, Rjust, RTrim, Serialize, String, Trim, Unserialize, Upper, Zfill

History​

0.9.6.56New to Version