ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Matthies <ml_ant-u...@nmhq.net>
Subject Re: Multiline regex matches
Date Tue, 17 Aug 2010 18:45:03 GMT
Depending on the file syntax, one could also do

    <fail>
        <condition>
            <resourcecount when="equal" count="0">
                <restrict>
                    <concat>
                        <filterchain><striplinebreaks/></filterchain>
                        <fileset file="${file}"/>
                    </concat>
                    <containsregexp expression="${regex}"/>
                </restrict>
            </resourcecount>
        </condition>
    </fail>

or replace the linebreaks by (e.g.) whitespace using a TokenFilter.
Assuming that everything is streamed (don't know whether that's the
case), this could be very efficient.

-- Niklas Matthies

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message