@Saq, much appreciated. Your filter is good but/and thanks to it I realized 
I need a "split*before*regexp". The idea is to use it to extract things in 
a dictionary so I circumvented the "$*:*/" issue by instead searching for 
colon+space. This is less than optimal because users might not stick to 
that when they type in an entry... but it's good enough.

Here's the result for anyone curious. Soon to be included in an updated 
HackSearch:

\define search-inner()
<$vars hasterm="""[enlist-input[]match[$(searchterm)$]]""">
   <$list 
filter="""[[dic]get[text]splitregexp[\n]prefix<candidate>filter<hasterm>then<candidate>]""">

   </$list>
</$vars>
\end

<$vars searchterm={{searchterm}} >
   <$list 
filter="""[[dic]get[text]splitregexp[\n]regexp<searchterm>splitbefore[: 
]removesuffix[: ]]""" variable=candidate>
      <<hacksearch-inner>>
   </$list>
</$vars>

<:-)
On Thursday, April 8, 2021 at 12:51:56 PM UTC+2 [email protected] wrote:

> Try this:
> (?<!\$):
>
> On my phone so this is untested.
>
> On Thursday, April 8, 2021 at 12:35:49 PM UTC+2 Mat wrote:
>
>> I hope to improve HackSearch <https://hacksearch.tiddlyhost.com/> with a 
>> *search* field so that users can add custom "search terms" in a 
>> dictionary to find tiddler titles that are used as dictionary indexes e.g 
>> like so:
>>
>> $:/core/UI/ViewTemplate/body : body text [[main field]]
>>
>> I.e searching for, say, "text" returns that system title.
>>
>> I have it working for non-system titles but one of the filter ops used is 
>> splitbefore[:] to split out the dictionary index in the entry row, but 
>> this doesn't work when the index is a system title because of the colon in $
>> *:*/...
>>
>> So I need *a splitregexp that only accepts : but not $:*
>>
>> Any help is welcome.
>>
>> Thank you.
>>
>> <:-)
>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c6c736fd-d099-4f2b-9ca0-f2bc710ae077n%40googlegroups.com.

Reply via email to