query
On this page

escapeRegex

lib.escapeRegex

Docs pulled from | This Revision | 10 minutes ago


Turn a string s into an exact regular expression

Inputs

s
1. Function argument

Type

escapeRegex :: string -> string

Examples

lib.strings.escapeRegex usage example

escapeRegex "[^a-z]*"
=> "\\[\\^a-z]\\*"
(lib.strings.escapeRegex)

Noogle detected

Aliases

Implementation

This function is implemented in c++ and is part of the native nix runtime.