View Single Post
Old 12-11-2021, 06:17 AM   #204
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,203
Karma: 1995558
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by ownedbycats View Post
I think I identified the misbehaving template.

New question (likely more regex issue): When using a 'contains' on a taglike, how can I make it match when there's multiple options? e.g.

Code:
program:
   f = field('#field');
   strcat
   (
    contains(f, "^foo|bar|foobar|test123$", 'icon.png:', ''),
   )
it sometimes breaks if "test123" is in the taglike. It works again if I remove the exact-match modifiers but then it's not exact matching.
I think you need to change the regex:

Code:
program:
   f = field('#field');
   strcat
   (
    contains(f, "^(foo|bar|foobar|test123)$", 'icon.png:', ''),
   )
capink is offline   Reply With Quote