regexp.quoteMeta() function
regexp.quoteMeta()
escapes all regular expression metacharacters in a string.
Function type signature
(v: string) => string
Parameters
v
(Required) String that contains regular expression metacharacters to escape.
Examples
Escape regular expression metacharacters in a string
import "regexp"
regexp.quoteMeta(v: ".+*?()|[]{}^$")// Returns "\.\+\*\?\(\)\|\[\]\{\}\^\$"
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Flux and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.