Possible bug in <propertyregex>

  • SimonWood

    SimonWood - 2005-02-16

    I am seeing some weird behaviour when using propertyregex.  I am using the following code:

    <propertyregex property="result" override="true" input="${input}" regexp="([^,]*)" replace="\1/**"/>

    With ${input} as one,two I get the following in result


    If I set global to false, it works correcly i.e.


    I do not think this is a regular expression problem as I have tried with the Java 1.4 support and with jakart-regexp with the same results in both cases.

    I have a workaround:

    <propertyregex property="result.temp" override="true" input="${input}" regexp="," replace="/**," defaultValue="${input}"/>
    <propertyregex property="result" override="true" input="${result.temp}" regexp=".*" replace="\0/**" global="false"/>

    BTW: the documentation says that the default value for global is false.  Howevere, it appears to have a default value of true.

    I have tried thid with version 1.0b1 and 1.0b2, both produce the same results.

    I am posting here first so as not to clutter up the bugs list if I am doing something stupid.  If it transpires that this is a genuine bug I will repost on the bugs list.

    Any comments gratefully received.

    • SimonWood

      SimonWood - 2005-02-16


      I was doing somethong stupid.  I should have been using ([\,]+) instead of ([\,]*).



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks