Regular Expressions 101

Community Patterns

1...34567...902

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
((((\b(#|\w)+\b\.)?(\bprototype\b\.)?(\b(#|\w)+\b)(\s*\=\s*)?)?(\b(#|\w)+\b\s*)\([\s\w,=]*\s*\))|(\bclass\b\s+\b\w+\b\s*(extends\s*\b\w+\b))(?=\s*\{[\s\S]+\}))(?=\s*\{[\s\S]+\})
/
gm

Description

((((\b(#|\w)+\b.)?(\bprototype\b.)?(\b(#|\w)+\b)(\s*=\s*)?)?(\b(#|\w)+\b\s*)([\s\w,=]\s))|(\bclass\b\s+\b\w+\b\s*(extends\s*\b\w+\b))(?=\s*{[\s\S]+}))(?=\s*{[\s\S]+})

Submitted by al.gau34 - 2 years ago