ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Modrall" <>
Subject using regexp filters
Date Fri, 28 Jul 2006 14:07:50 GMT


            I'm trying to filter the output from an svn update to get
the version number it's up to.  I want to grab just the version number
and output that to a file.  I've been experimenting with <redirector> on
<exec> but I'm running into some odd things (at least from what I can
tell out of the documentation).


    <exec executable="svn" outputproperty="upout">

            <arg line="update"/>




                                    <contains value="revision"/>






Correctly outputs just the last line which contains the revision number,



                        <regexp pattern="*revision*"/>


Produces no output.  Seemed odd to me, since the pattern is effectively
the same.


            Since ultimately, I also wanted to pick the rev number out
of the string I identified, I experimented with some of the other
filters, like containsstring, containsregexp, replaceregexp.  For
whatever reason, I can't get any regexp to find a match on anything
containing "revision" no matter what I try.  I've also run into some
oddities, like <containsregex> doesn't throw an error when not under
<tokenfilter>; unfortunately it doesn't produce a match either.


            Can anyone point me in the right direction to figure out why
regexps aren't hitting for me?


            I'm using ant 1.6.5 on windows, by the by.




This e-mail message, and any attachments, is intended only for the use of the individual or
entity identified in the alias address of this message and may contain information that is
confidential, privileged and subject to legal restrictions and penalties regarding its unauthorized
disclosure and use. Any unauthorized review, copying, disclosure, use or distribution is strictly
prohibited. If you have received this e-mail message in error, please notify the sender immediately
by reply e-mail and delete this message, and any attachments, from your system. Thank you.

  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message