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]+$", "") )
#endif
See the APIdoc for the String and java.util.regex.Pattern classes
for more information.
Cheers,
:) Christoph Reck
Liu, Teh P wrote:
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]