+++ # ----------------------------------------------------------------------- # Do not edit this file. It is automatically generated by API Documenter. # ----------------------------------------------------------------------- title = "stringToJsRegex" keywords = ["grafana","documentation","sdk","@grafana/data"] type = "docs" +++ ## stringToJsRegex() function ### stringToJsRegex() function Signature ```typescript export declare function stringToJsRegex(str: string): RegExp; ``` Import ```typescript import { stringToJsRegex } from '@grafana/data'; ``` Parameters | Parameter | Type | Description | | --- | --- | --- | | str | string | | Returns: `RegExp`