Skip to contents

Escape a string for possible regular expression match

Usage

escapeForRegex(string)

Arguments

string

String to be escaped

Value

string with prefix "\Q" and suffix "\E" appended. The resulting string will not be recognized as a regular expression pattern.