For the record, \b appears limited to ASCII characters. It will not match
non-English diacritics correctly, as explained in this post
<https://stackoverflow.com/questions/5311618/javascript-regular-expression-problem-with-b-and-international-characters/5311760>
.
Regards,
Hubert
On Wednesday, 29 April 2020 16:25:10 UTC+1, Hubert wrote:
>
> OK, I had to resort to the $wikify widget but now it works:
>
> <$wikify name="searchterm" text="""\b{{$:/note!!note}}\b""">
> <$list filter="""[tag[note]search:title:regexp<searchterm>]""">
> <<ListedNotes>>
> </$list>
> </$wikify>
>
> Thanks again Mark for pointing me in the right direction!
>
> Regards,
> Hubert
>
> On Wednesday, 29 April 2020 15:52:26 UTC+1, Hubert wrote:
>>
>> Thanks Mark.
>>
>> I still can't get it to work. Here's my entire filter expression. I know
>> it's clearly incorrect but I can't find any other way to reconcile the
>> different types of brackets with the title flag, the regex expression and
>> the in-filter transclusion.
>>
>> My search string to be matched is in the note field of the $:/note
>> tiddler:
>>
>> <$list filter="""[tag[note]regexp:title[\b{$:/note!!note}\b]]""">
>>
>> </$list>
>>
>> Thanks!
>> Hubert
>>
>> On Wednesday, 29 April 2020 15:32:31 UTC+1, Mark S. wrote:
>>>
>>> Something like:
>>>
>>> [regexp:text[\bTW\b]]
>>>
>>>
>>>
>>> On Wednesday, April 29, 2020 at 7:09:02 AM UTC-7, Hubert wrote:
>>>>
>>>> Hi,
>>>>
>>>> I want to only find whole words when using the search Operator
>>>> <https://tiddlywiki.com/static/search%2520Operator.html>.
>>>>
>>>> I've tried the options listed here
>>>> <https://tiddlywiki.com/static/search%2520Operator.html> but cannot
>>>> make my filter expression match whole words only, even when using the
>>>> *literal* flag for search strings.
>>>>
>>>> For example, when the search string is TW I only want to find this:
>>>>
>>>> - *TW info*
>>>> - *Hints for tw linking*
>>>>
>>>>
>>>> and NOT this:
>>>>
>>>> -
>>>> *Two little monkeys *
>>>>
>>>> I suspect that the whole word search can be achieved with regex, would
>>>> anyone have any idea how?
>>>>
>>>> Many thanks!
>>>> Hubert
>>>>
>>>
--
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/8e57ba61-e21a-4ac0-97d1-83bd6e62ac3b%40googlegroups.com.