Regular Expressions 101

Community Patterns

Match code in JS(basic)

1

Regular Expression
ECMAScript (JavaScript)

/
[\n\r]*.*function.*(.*).*{.*
/

Description

it matches the code in JS, assumes that at least one function is defined to match with.

Submitted by Dark knight - 8 years ago