Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

propertyregex global attribute not working

Help
BiAiB
2010-05-18
2013-04-24
  • BiAiB
    BiAiB
    2010-05-18

    Hillo,

    I must use a global replacement regex, but <propertyregex> only match the first occurence. Here's the code:

    <propertyregex property="append.order.min"
        input="bla,blabla,tic"
        regexp="([^,]+)"
        select="\1-min.js"
        global="true"
        defaultValue="fail" />
    

    append.order.min returns

    'bla-min.js'
    

    instead

    'bla-min.js,blabla-min.js,tic-min.js'
    

    I've check my regex with http://gskinner.com/RegExr/, and it work there.

    the documentation say this about attribute global:
    global : Should a replacement operation be performed on the entire string, rather than just the first occurance
    Not required. default is false.

    Am I missing something or this is a bug ?

     
  • BiAiB
    BiAiB
    2010-05-18

    hu, I just realize my mistake :

    should have use

     replace="\1-min.js"
    

    instead

     select="\1-min.js"
    

    .