Community Patterns

Community Library Entry

2

Regular Expression
Created·2016-08-20 09:22
Flavor·ECMAScript (JavaScript)

/
([-\[\]{}()*+?.,\\\/^$|#])
/
g
Open regex in editor

Description

This expression escapes characters, which have a special meaning in regex, like .?[]/ and so on.

Use it to transform a string that you want to use literally in another regex.

Submitted by Florian Andresen