+++
# -----------------------------------------------------------------------
# Do not edit this file. It is automatically generated by API Documenter.
# -----------------------------------------------------------------------
title = "findMatchesInText"
keywords = ["grafana","documentation","sdk","@grafana/data"]
type = "docs"
draft = true
+++

## findMatchesInText() function

### findMatchesInText() function

Returns a list of substring regexp matches.

<b>Signature</b>

```typescript
export declare function findMatchesInText(haystack: string, needle: string): TextMatch[];
```
<b>Import</b>

```typescript
import { findMatchesInText } from '@grafana/data';
```
<b>Parameters</b>

|  Parameter | Type | Description |
|  --- | --- | --- |
|  haystack | <code>string</code> |  |
|  needle | <code>string</code> |  |

<b>Returns:</b>

`TextMatch[]`

