Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^(?!\s*angular)(\s*)(\S+)\.forEach\(
/

Description

A regex and replace pattern pair for replacing array.forEach(func) with angular.forEach(array, func) This is useful because IE8 does not support array.forEach.

Submitted by anonymous - 9 years ago