After some searching the Ant documentation, I came up with a round way to figure this out. Get the length of the file matching the regular expression. If it is greater than 0, follow the additional steps.
<if>
<length when="greater" length="0">
<fileset file="${build.log}">
<containsregexp expression="\[java\].*error"/>
</fileset>
</length>
<then>
</then>
</if>
, Ant , , Ant 1.6. 5.