Use of conditional regexp with Djula
"steph.tougard via Sbcl-help" <[email protected]> Thu, 31 Oct 2024 07:02:30 +0000
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <QrqKYWvmk-BIVTgcTCEhog4Tf4DyIdZ68HM4aruV9A-uCLOWN0YQWY38u8ydUUbJBPYeVsxuQwOA5t_mofg6SIYIal6uOA4GaD82q_WCYu4=@pm.me> |
Hello All,
Not sure it's really the right place to ask since this is not specific to SBCL but concerns Djula, a rendering template library running over SBCL.
Anyway, help is welcome.
I'm trying to use a conditional based on a regexp (a start-with to be more precise)
{% if var == "text" %} test equality of the string in the template, but would I do :
{% if var ~= /^text/ %}
I've added a filter, but it seems that I can not compare the result of the filter with the string
{% if var|starts-with == "ABC" %}
That just does not work. I read the documentation again and again, and I can not see any solution.
Any idea here ?
_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help