On Thu, Apr 30, 2009 at 11:56 AM, Chris Travers <[email protected]>wrote:
> Is there a preferred way to pass data containing the '/' through the
> grep vmethod?
>
> I can't get grep to match presumably due to string interpolation
> issues. THe issue is that the data I am trying to match is 'mm/dd/yy'
>
> Any ideas?
>
"/" isn't a regex metacharacter, and shouldn't cause any particular issues:
Template->new->process(\'[% FOR i IN list.grep("mm/dd/yy"); i; END %]', {
list => [ 'mm/dd/yy' ] });
This prints 'mm/dd/yy' for me.
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates