Regular Expressions 101

Library entries

regex for void javascript functions

Vote

0

Regular Expression
pcre

/
(?<name>[a-zA-Z0-9]*(?<!constructor)(?<!if)\s*)(?<arguments>\([^()\r]*\))(?<body>\s*{((?:[^{}](?!return))*(?:\g<body>)?)+})
/
gm

Description

Loading markdown...
Submitted by anonymous - 7 months ago