en:countx [BASIC 256 - Language Documentation]

# BASIC 256 - Language Documentation

en:countx

## Countx (Function)

### Format

countx ( haystack_expr , regex_expr )

returns positive_integer_value

### 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, Lower, MD5, Mid, Midx, Replace, Replacex, Right, String, Upper

### History

0.9.6.56 | New to Version

en/countx.txt · Last modified: 2014/08/06 20:17 by admin