Re: template string question

2005-06-01 Thread Christoph Reck
if you are using Java1.4 to run the veolicty application, consider using the regular expression capabilities of the String class: #set( $string = "TehpaoLiu" ) #if( $string.matches("[a-z][A-Z]") )## or $string.substring(1).matches("[A-Z]") #set( $string = $string.replaceAll("[A-Z][a-z]+$", "")

Re: template string question

2005-05-25 Thread Barbara Baughman
Since Velocity is using Java, you have access to all of the public methods of the classes in the java.lang package. String methods are included. #set ($string="TehpaoLiu") $string.substring(0,6) Barbara Baughman X2157 On Wed, 25 May 2005, Liu, Teh P wrote: > Hi All, > > I have a string "TehpaoL

Re: template string question

2005-05-25 Thread Adam Williams
On 5/25/05, Liu, Teh P <[EMAIL PROTECTED]> wrote: > I have a string "TehpaoLiu" > Is it possible to just extract "Tehpao" from the above string in velocity? That is a very vague question, but I suppose that since you know the value of the String, you know the start and end index of the characters

template string question

2005-05-25 Thread Liu, Teh P
Hi All, I have a string "TehpaoLiu" Is it possible to just extract "Tehpao" from the above string in velocity? Any help will be appreciated. Thanks - tehpao