velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergiu Dumitriu <ser...@xwiki.com>
Subject Re: Regex in Velocity templtes
Date Tue, 05 Apr 2011 13:22:10 GMT
On 04/05/2011 02:40 PM, Rachid wrote:
> By default you can use the regex functions of the Java String object.
> http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html
>
> See for example:
> http://wiki.dbsight.com/index.php?title=Velocity_Template_Help
> And search for 'regex'
>

Or, if you want access to more advanced stuff, you can use a custom 
velocity tool, such as
https://svn.xwiki.org/svnroot/xwiki/commons/xwiki-commons-core/trunk/xwiki-commons-velocity/src/main/java/org/xwiki/velocity/tools/RegexTool.java

>
>
> On Tue, Apr 5, 2011 at 2:35 PM, Faour, Samer (CA - Toronto)<
> sfaour@deloitte.ca>  wrote:
>
>> Hi,
>>
>> Is it possible to use Regex in Velocity Templates?
>> And if so, are there any prerequisites?
>>
>> Thanks,
>> Samer
>>
>> Samer Faour
>> Consultant | Information&  Technology Risk Solutions
>> Deloitte
>> Commerce Court South, 30 Wellington Street West,
>> P.O. Box 400 Stn Commerce, Toronto, ON M5L 1B1, Canada
>> Mobile 647-989-3910 | Direct 416-775-8833 | Fax 416-601-6400
>> sfaour@deloitte.ca<mailto:sfaour@deloitte.ca>  | www.deloitte.ca
>>
>> Deloitte is proud to be an Official Supplier of the Canadian Olympic team
>>
>> Please consider the environment before printing.
>>
>>
>


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/

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


Mime
View raw message