<% my_test = [1000];
                IF my_test.grep("^1$").size %>TEST <% END %>

For some reason, the test is returning true.

<% my_test = [1000];
                IF my_test.grep("^2$").size %>TEST <% END %>

Returns false.

<% my_test = [1000];
                IF my_test.grep("^0$").size %>TEST <% END %>

I would have expected the grep to match if any element in the list was
exactly a value of "1" but instead it seems to ignore the end of line
character.

Any idea why?

Best Wishes,
Chris Travers

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to