How to add regexp without case sensitive in the 'image-picker' macro?

I’m using successfully the image-picker macro as follow

<$transclude tiddler={{$:/_MyImage}}/> <$macrocall $name=‘image-picker’ actions="<$action-setfield $tiddler=’$:/_MyImage’ $value=<>/> " subfilter=“regexp{$:/temp/state!!practise_title}”/>

This works but the subfilter is case sensitive

I’ve tried to add (?i) to not be case sensitive in the $:/temp/state!!practise_title value like
subfilter=“regexp(?i) {$:/temp/state!!practise_title}” but this does not work

Any idea how to solve that ?

Thanks for your support & help

Regards

The (?i) needs to be part of the regexp[] parameter value. Thus, you could write:

<$let re={{{ [{$:/temp/state!!practise_title}addprefix[(?i)]] }}}>
<$macrocall $name="image-picker" actions="..." subfilter="regexp<re>"/>

However, if you use search:title:regexp[] instead of regexp[], you don’t need to add (?i) to the param, since search[] defaults to using case-insensitive regexp matching.

Try this:

<$macrocall $name="image-picker" actions="..." subfilter="search:title:regexp{$:/temp/state!!practise_title}"/>`

enjoy,
-e

magic as usual !!!

Thanks a lot !

Regards
Vpl