Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
function(\s*)\(((\S+,* *)*)\)(\s*){
/
g

Description

Converts standard function(a,b) function notation into (a, b) => { shorthand for ES6.

Submitted by Simon Poole - 8 years ago