Search operator -- anchored flag

I’m running TW 5.2.7 and I don’t think the anchored flag on the search operator is working? My filter looks like this:

[search:tags:literal,anchored[ip]]

… and I’m getting tiddlers with tags like ipcalc, etc. Is this me or is this a known bug?

Thats is how I read it would work, that is it would not find aipcalc or calcip

You mean you agree it may be a bug?

What kind of results are you expecting?

“literal” treats the filter operand value as a literal string that can contain whitespace as opposed to the default “words” flag, which treats the filter operand value as a list of whitespace-separated tokens. Note that since your specified operand value ("[ip]") does not contain any spaces, “literal”, “whitespace”, “words” and “some” are all equivalent. As such, you could omit the “literal” flag and allow the default “words” flag to be used.

“anchored” requires the filter operand value to occur at the beginning of the field being searched (as opposed to occurring as a substring anywhere within the field) value).

Thus, as @TW_Tones noted, your filter would find tiddlers whose tag field begins with “ip”, e.g., ipcalc, but not tag fields containing aipcalc or calcip, since those tag fields do not start with “ip”.

Oh, got it.

I thought anchored meant it would anchor at both ends of the search term.

Hmm, how would I search exactly for ip?

Instead of the search filter operator, try using a filter like:

[contains:tags[in]]

ref: https://tiddlywiki.com/#contains%20Operator

and, since you are searching for a matching tag, an even simpler solution would be:

[tag[in]]

ref: https://tiddlywiki.com/#tag%20Operator

problem is i might be looking for that case insensitively. maybe i could use the regex mode with word boundaries?