How to use wildcards in Jira search

Miguel Sanchez August 4, 2011

Hi,

I'm trying to create filters for confluence pages, but our naming scheme for Jira issues has made this a bit difficult

So this is what the title of an issue looks like, with animals subbed in

Cat Dog (Mouse Cow:Pig_Duck_01)
Cat Dog (Mouse Cow:Pig_Duck_02)
...
and so on

Now searching for "Pig_Duck_01" returns the first issue, but "Pig_Duck_0?" returns nothing. I've tried many combinations of *, ?,

matching a larger sequence and escaping the parens and more but cant seem to get it to match

im familiar with regex's and this is essentially what i want to match with the Jira search query

Cat Dog (Mouse Cow:Pig_Duck_\d+)
or just
Pig_Duck_\d+
would be enough

If anyone can help me here or point out what im doing wrong, that would be great.

M. Sanchez

3 answers

4 votes
justindowning
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2011

From: http://confluence.atlassian.com/display/JIRA/Performing+Text+Searches

You cannot search on word parts, only on whole words.

You can use '?' for single character replacement or '*' for multiple character replacement. I would suggest your search include the entire 'word' in your example: Cow:Pig_Duck_0?

As J Thomas points out, the summary filed (which I believe you reference as title) has the ability to use the CONTAINS ('~') operator. So, a JQL query like this should work too: summary ~ "Pig_Duck_0*"

Ian Tait December 13, 2019

Can't search partial words? What a garbage query language.

Like # people like this
1 vote
J Thomas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 4, 2011

What sort of field is the 'title' that you're searching on? Do you get a ~ operator in the Advanced Search? This would search for issues containing the specified value so using just Pig_Duck_0 with no wildcard should work.

The Summary field uses the ~ operator so if I search my JIRA for issues where summary ~ leave I get issues where summary contains the word 'Leaver'.

jennma March 10, 2017

Nice one!  Worked for me using  the tilda!

paulacruickshank October 7, 2020

That doesn't work for me at all

We have a field which can be filled with a release value eg

R1.1

R1.1.1

R1.1.3

The only operators that work are the ~ and IS. But I can't find anyway at all to bring up all issues which have these three values in by only specifying the R1.1 part

Like Marc likes this
0 votes
Matthew Mares April 8, 2016

In short:

  • Use '*' for multiple character replacement
  • Or use '?' for single character replacement

 

scherbank October 3, 2017

I guess also ~ instead of = at the beginning.

Like Mike Ellertson likes this
paulacruickshank October 7, 2020

Typing * or ? in my query only results in the message that they are special characters and cannot be used?

paulacruickshank October 7, 2020

Aha I have to sound the body of the text in quotes. Thank you

Suggest an answer

Log in or Sign up to answer