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.