ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy2008 <hoangt...@yahoo.com>
Subject Re: PropertyRegex help
Date Fri, 16 Apr 2010 16:26:15 GMT

It worked with the (.*).  You guys are awesome.

Thanks


David Weintraub wrote:
> 
> You need to learn about Regular Expressions and how they work.
> 
> Try regexp="dev-(.*)" instead of regexp="dev-*"
> 
> Note that I'm using "period asterisk" and not just an asterisk. An
> asterisk
> means zero or more of the previous "character" and period means any
> character". Combined, that means any string of any length (even zero in
> length).
> 
> The parentheses mark the area you want to select. Since it is the first
> pair
> of parentheses, it's "\1".
> 
> Here's a document I created to explain regular expressions: <
> http://dl.dropbox.com/u/433257/Regular_Expressions.doc>
> 
> On Thu, Apr 15, 2010 at 8:18 PM, Andy2008 <hoangtu69@yahoo.com> wrote:
> 
>>
>> Here's my input
>>
>> dev-abc.com:8001
>>
>> I want abc.com:8001 back.  Below is my propertyregex
>>
>> <propertyregex  property="url"
>>                input="dev-abc.com:8001"
>>                regexp="dev-*"
>>                     select="\1"
>>                                 casesensitive="false" />
>>
>> but <echo>${url}</echo> returns \1
>>
>> Do you have any ideas?
>> --
>> View this message in context:
>> http://old.nabble.com/PropertyRegex-help-tp28261946p28261946.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
> 
> 
> -- 
> David Weintraub
> qazwart@gmail.com
> 
> 

-- 
View this message in context: http://old.nabble.com/PropertyRegex-help-tp28261946p28268989.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message