Delete the space. E.g. (requires AntContrib)

<propertyregex 
  property="os.name2"         The new property to use
  input="${os.name}"          Get "Windows XP" from system
  regexp=" "                  Check the space ...
  replace=""                  ... and replace with empty string
/>
<echo>${os.name2}</echo>      and get "WindowsXP"


<property file="${os.name2}.properties"/>



Jan


> -----Original Message-----
> From: Baz [mailto:[EMAIL PROTECTED]
> Sent: Monday, January 19, 2004 10:02 PM
> To: Ant Users List
> Subject: Re: os.name for windows return "Windows XP"?
> 
> 
> Anderson, Conor and all,
> 
> Thanks for the inputs.
> 
> I will see what i can do now.
> 
> Barry
> 
> ----- Original Message ----- 
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, January 15, 2004 5:24 PM
> Subject: os.name for windows return "Windows XP"?
> 
> 
> > Hi,
> >
> > There must be someone who is dealing with the same issue. I 
> am trying to
> take
> > multiplatform builds with different ${os.name}.properties 
> file. Linux is
> not a
> > problem, Linux.properties. What about Windows? It becomes Windows
> > XP.properties files.
> >
> > Can someone enlight me the better way to do this with one 
> word .properties
> > name?
> >
> > Thanks
> >
> > Barry
> >
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to