> 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/countmatches.md).

# CountMatches

Finds and counts all string matches

```mathematica
CountMatches("WINDOWS", "W") → 2
CountMatches("1 2 3 4 5 6", 7) → 0
```

#### Inputs

`CountMatches(string, search, [isCaseSensitive])`

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