velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sitaram Krishnamurthy <skris...@tibco.com>
Subject RE: Issue with #set/replaceAll
Date Mon, 06 Sep 2004 15:05:44 GMT
Hi Shinobu,

I would want to replace all occurrences of CONTAINER/test with $Map/test
Finally when I print $test it should look
"My String is $Map/test"

Just so that you know, I use velocity 1.4

Thanks
Sitaram
p.s:  Please read #set ($def = '$Map/test) as #set ($def = '$Map/test').
There was a missing '



> -----Original Message-----
> From: Shinobu Kawai [mailto:shinobu.kawai@gmail.com]
> Sent: Monday, September 06, 2004 8:28 PM
> To: Velocity Users List; skrishna@tibco.com
> Subject: Re: Issue with #set/replaceAll
> 
> Hi Sitaram,
> 
> > What is wrong with the following set's?  $test always returns the same
> value
> > as $try.
> > Only time it works if when I remove the "$" from $def
> > Any help is appreciated.
> Can you tell us what you expect it to become?
> 
> > #set ($try = "My String is CONTAINER/test")
> > #set ($abc = "CONTAINER/test")
> > #set ($def = '$Map/test)
> > #set ($test = $try.replaceAll($abc,$def)
> > Test is $test
> 
> Best regards,
> -- Shinobu Kawai
> 
> --
> Shinobu Kawai(shinobu.kawai@gmail.com)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org


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


Mime
View raw message