> For the complete documentation index, see [llms.txt](https://docs.tabula.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tabula.io/data-transformation/formulas/string-functions/countmatchesregexp.md).

# CountMatchesRegexp

Finds and counts all regular expression matches

```mathematica
CountMatchesRegexp("MAC", "[A-Z]") → 3
CountMatchesRegexp("1234", "[5-9]") → 0
```

#### Inputs

`CountMatchesRegexp(string, searchRegexp, [isCaseSensitive])`

* `string` - A text value to search in
* `searchRegexp` - A regular expression to search for
* `[isCaseSensitive]` - **\[optional**: `true` by default\*\*]\*\* - Set `false` if search should be case **insensitive**
