Hee - good pt about the .* ;)
On Thu, 15 Apr 2010, 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 <[email protected]> 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: [email protected] For additional commands, e-mail: [email protected]
-- Scot P. Floess 27 Lake Royale Louisburg, NC 27549 252-478-8087 (Home) 919-890-8117 (Work) Chief Architect JPlate http://sourceforge.net/projects/jplate Chief Architect JavaPIM http://sourceforge.net/projects/javapim Architect Keros http://sourceforge.net/projects/keros --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
