Community Patterns

Community Library Entry

0

Regular Expression
Created·2023-01-28 09:56
Flavor·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
Open regex in editor

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