src code

instance method Enumerable#grep

Enumerable#grep(regex[, iterator = Prototype.K[, context]]) → Array

Returns all the elements that match the filter. If an iterator is provided, it is used to produce the returned value for each selected element.