G.8 Containsregexp

The <containsregexp> tag selects the files whose contents contain a match to the regular expression specified by the expression attribute.

<fileset dir="${src}" includes="*.txt">
  <containsregexp expression="[4-6]\.[0-9]"/>

Table G.8:  Attributes for the <containsregexp> selector

expressionSpecifies the regular expression that must match true in every file.n/aYes
casesensitivePerform a case sensitive match.trueNo
multilinePerform a multi line match.falseNo