How to use the underscore character in a search query in YouTrack?

We are using YouTrack Standalone 2019.2 Build 58831. We have a project with a field of type "text" where we enter program names, e.g. "$TABI3_I04". One of our users wanted to search for all programs beginning with "$TABI3_I" and his query yielded to no results, although when searching with "$TABI3_I04" or "$TABI3", results were found. I guess it has something to do with the underscore character to be treated as special tokenizer or something like that. I was not even able to get a search result by typing "$TABI3*I04" e.g.

Can anyone tell me please how to search in "text" fields containing underscores correctly?

Comment actions Permalink
Official comment

Hello Andreas,

thank you for your question.

In your case, you need to use a wildcard (*) in your search.

However, the thing is, when you use underscores in the text search, it serves as a delimiter between words. A wildcard works only with prefixes of 3+symbols after a delimiter, so it would only work like this: `$TABI3_I04*`, but this wouldn't make sense in your case.

What I can recommend for this particular case is to search for this: `$TABI3*`, this should get you relevant results.

Here you can learn more about wildcards in text search:

Let us know if you have any further questions, we'll be happy to help.

Comment actions Permalink


Thank you for your quick reply. In my case, searching for `$TABI3*` indeed works. I have 4 issues left as search results in that particular case and have to pick the relevant issue(s) manually. This is not a big deal, if I know how to search. So the next thing I will do is to tell our users how to accurately perform a search, because else, issues are not found in some cases.

As I can deduce from your answer, it is currently not possible to escape the word delimiter anyhow right now. This leads me to another question: Is it planned to change the behavior in future releases to be able to get search results when e.g. I search for `$TABI3_I0*`? Currently, no results are found in our case because the underscore is treated as a word delimiter. And sadly, I do not even get feedback from the user interface, why a search yielded to no results. If I do not expect search results, it can be confusing for users that do not know how to accurately perform the search.

Comment actions Permalink

Hello Andreas,

thank you for the update, I'm glad the recommended search query works for you.

Yes, you're right, it's not possible to escape the delimiter. The feature that would help you solve this problem with search is this one: This feature would allow for exact match search in YouTrack. As you can see, it's already implemented but it's not released yet because we have some related performance issues to solve before its release. Please feel free to subscribe to updates of this feature in our tracker to be notified of any progress here.

In any case, feel free to share the link to our current documentation on text search with your colleagues:


Please sign in to leave a comment.