Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-03-20 10:32
Flavor·ECMAScript (JavaScript)

/
^[\x20\t\r\n\f]+|((?:^|[^\\])(?:\\.)*)[\x20\t\r\n\f]+$
/
gm
Open regex in editor

Description

The regular expression used in the jQuery library to match characters that should be trimmed from selector strings.

Submitted by Ben