Regular Expressions 101

Community Patterns

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