Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^\s*function\s+(\w+)\s*\(
/

Description

Extracts the name of the outer function. Useful to get the name of a function reference using fn.toString().

Submitted by Jack A. - 11 years ago