This page last changed on Feb 17, 2006 by [email protected].

Tag - grep

Description

Uses the Groovy JDK grep method to iterate over each element of the specified object that match the
specified "filter" attribute. The filter can be different instances such as classes, regex patterns etc.

Parameters

  • in - The object to iterative over
  • filter - The filter instance

Examples

Stephen King's non-fiction Books:
<g:grep in="${books}" filter="NonFictionBooks.class">
     <p>Title: ${it.title}</p>
</g:grep>

 

Document generated by Confluence on Mar 29, 2006 08:46