Filtering tag in search result used in the query

What I’m trying to do

In some notes in my wiki, lines can have 2 tags. One linked to a reference and another one set to priority
I have installed the Query Control module so that in a summup page, I do have many queries such as :

tag: #ref/theme1/blabla 
hideTitle: true
renderMarkdown: true

The problem is that in the result, the tag #ref/theme1/blabla is shown and I want only what is following this tag, ie : the second tag that rendered in color (color tag wrangler) and the text following…

Things I have tried

I searched the forum but could not find filtering tag or data on query result.
I started to look at the Query Control main.js where there are some regexp but I am not too sure the solution would be to modify this file to filter out the tag used for the search in the query result data ?

Query Control – which is a discontinued plugin with various issues on its GitHub page – adds extra functionality to the core plugin Search (in your case Inline Query, as I gather), which doesn’t allow the user to filter well on what they want to see in the results.

Instead of hacking the main.js of this plugin, look into the documentation of Dataview – the utility you should start thinking about using – and its various functions relating to regex and their abilities to filter out unwanted strings.

So instead of results like

Example text #ref/theme1/blabla #tag2

You want to see

#tag2

Is that right?

If so you can do that with a regular expression. I think this will work, but it might need adjustment:

/(?<=#ref\/theme1\/blabla ).+$/

This tells Search to use a regular expression that matches anything (.+) that follows #ref/theme1/blabla and a space, up to the end of the line ($). It searches the tag as text instead of as a tag because that’s needed to do this. The backslashes prevent the slashes in the tag from prematurely ending the expression.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.