On Tue, 26 May 2015 16:53:19 +0200
Jochen Schnuerle <j...@schnuerle.com> wrote:

> I have following code (i use dancer - so <% is [%):
> 
> <% esxiver = "51u2" %>
[...]
> I try use the re in the match string direct:
> 
> <% IF esxi.match('\b${esxiver}\b') %>
> 
> Maybe I misunterstand the match method.
> 
> Can anyone help me, please ?

Perhaps it would interpolate if you use double quotes:

<% IF esxi.match("\b${esxiver}\b") %>

...but you may have to escape the backslashes by doubling them:

<% IF esxi.match("\\b${esxiver}\\b") %>

Or else just concatenate it:

<% IF esxi.match('\b' _ ${esxiver} _ '\b') %>


-- 

C. Chad Wallace, B.Sc.
The Lodging Company
http://www.lodgingcompany.com/
OpenPGP Public Key ID: 0x262208A0


_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to