Am Mittwoch, 31. Dezember 2014 17:15:05 UTC+1 schrieb Jeremy Ruston:
>
> Hi Tobias
>
> > Smells like a core feature to me.
>
> However, this implementation uses the deprecated regexp operand syntax. We 
> should use the new `regexp` filter operator instead if possible.
>

It's possible. It's also possible to ignore case:

\define searchInField(field, for, ignore)

<$list filter="[!is[shadow]!is[system]regexp:$field$[$for$$ignore$]]">

<$link><$view field="title"/></$link>

</$list>

\end


<$edit-text tiddler="$:/temp/advancedsearch" type="search" tag="input"/> 
<$select field="fieldname" tiddler="$:/temp/advancedsearch">
<option value="Any">Any</option>
<$list filter="[!is[shadow]!is[system]fields[]sort[]]" variable="fieldname">
<option value=<<fieldname>>><<fieldname>></option>
</$list>
</$select> <$checkbox field="ignore" tiddler="$:/temp/advancedsearch" 
checked="(?i)"> ignore case</$checkbox>

<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$reveal state="$:/temp/advancedsearch!!fieldname" type="match" text="Any">
<$list filter="[!is[shadow]!is[system]fields[]]" variable="fieldname">


Searching in field: <<fieldname>>

<$macrocall $name="searchInField" field=<<fieldname>> 
for={{$:/temp/advancedsearch}} ignore={{$:/temp/advancedsearch!!ignore}}/>

</$list>
</$reveal>
<$reveal state="$:/temp/advancedsearch!!fieldname" type="nomatch" text="Any
">

Searching in field: {{$:/temp/advancedsearch!!fieldname}}

<$macrocall $name="searchInField" 
field={{$:/temp/advancedsearch!!fieldname}} for={{$:/temp/advancedsearch}} 
ignore={{$:/temp/advancedsearch!!ignore}}/>

</$reveal>

</$reveal>


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to