You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Tennis Smith <te...@yahoo.com> on 2011/06/25 01:23:34 UTC

Storing RegEx In Properties Files?

Hi,

I'm processing a series of log files and looking at each one for certain
strings of interest.  Rather than keep the regex strings in the ant file
itself, it would be preferable to keep them as a group of properties stored
in a file.

Is this possible?  Has anyone tried keeping their regex values in a
properties file?

-- 
Tks,
-Tennis

Re: Storing RegEx In Properties Files?

Posted by wolfgang haefelinger <wh...@gmail.com>.
> Is this possible?

Properties are strings, a regular expression is a string - what are
your concerns?

Something popping up is that '#' and '!' start a comment in a property
string. You need to make sure to escape them.

// Wolfgang

On Sat, Jun 25, 2011 at 1:23 AM, Tennis Smith <te...@yahoo.com> wrote:
> Hi,
>
> I'm processing a series of log files and looking at each one for certain
> strings of interest.  Rather than keep the regex strings in the ant file
> itself, it would be preferable to keep them as a group of properties stored
> in a file.
>
> Is this possible?  Has anyone tried keeping their regex values in a
> properties file?
>
> --
> Tks,
> -Tennis
>

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