On Tuesday, December 10, 2019 at 4:11:33 PM UTC-8, Mark S. wrote:
>
> For the 2nd part, wrap the lookup macro with a list that uses a minlength
> operator:
>
I don't think that's what he is trying to achieve... he said he *wants* to
search for single character input, but only get results for which that
character occurs in isolation:
in his initial question, PWL wrote:
> when I try to search a single character it returns every entry with that
> particular character in it even if it is part of a series or another
> number. I want to search for the number 2 and I get returns that include
> 2, 12, 20, 22. is there a way to fix this?
One possibility is to use the more strict "literal" search flag that would
require an exact match of the input. Like this:
<option value="[has[intelligence]search:intelligence:literal
{$:/temp/search}]">Intelligence</option>
<option value="[has[climate_terrain]search:climate_terrain:literal
{$:/temp/search}]">Climate/Terrain</option>
<option value="[has[hd]search:hd:literal{$:/temp/search}]">HD</option>
Then, when entering the search input, he could type in the number,
surrounded by whitespace (e.g., " 2 ", without the quotes)
That *should* force the search to match only the number 2 as a separate
"word" in the text, preventing it from matching "12", "20", or "22".
Of course, if the number is at the start or end of the text to match, he
would need to type "2 " or " 2", respectively.
It's not a perfect solution, but it might allow him to work around some of
the specific use-cases he needs.
-e
--
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/624966a7-315e-4512-9d1d-5f81ca2ad963%40googlegroups.com.