Shawn,
 
If you want to leap using nant 0.85 then you can use the string::replace function.   So, it would be something like:
 
${string::replace(build.number,'.','_')}
 
Otherwise (for Nant 0.84) , you'll have to do something what's posted in an earlier thread ( http://www.mail-archive.com/nant-users%40lists.sourceforge.net/msg04610.html ). 
 
HTH,
Felice
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Shawn Haigh
Sent: Wednesday, September 01, 2004 4:14 PM
To: [EMAIL PROTECTED]
Subject: [Nant-users] Newbie question

Greetings Nant users.

 

Does anyone have an idea on how to manipulate property strings? 

 

I have a property ${build.number} that contains a value of “1.0.801.1” I would like to replace the dots (.) with underscores (_)…  

 

I have gotten as far as using regExp in VB to return my desired result using the code:

 

<snip>

str = "1.0.801.0"

Set re = New regExp

re.Global = True

re.Pattern = "\."

str = re.Replace(str, "_")

WScript.echo str

 

 

This works fine using Windows scripting host, now how would I go about incorporating this into my build script and use the ${build.version} property?

 

ThanX in advance…

 

Shawn

Nant 0.84

Nant-contrib 0.84

Reply via email to