The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • How can I use regex in a JQL query? I cannot match strings that have a specific ending in JQL (ex: *ing ; should match running, jogging, etc.)...

How can I use regex in a JQL query? I cannot match strings that have a specific ending in JQL (ex: *ing ; should match running, jogging, etc.)...

Eric
Contributor
February 14, 2013

Is there a way to use regex in JQL? If not, is there a way to use a wildcard character at the begining of a string? When I use the following to match any issues that contain "Citrix", I recieve the following error:

 project="SPDM" AND status="open" AND summary~"*Citrix" AND summary~"Requests"'

 Query validation failed: The text query '*' for field 'summary' is not allowed to start with '*'.

I'm using the JQL for queries I am making with a SOAP client (I know SOAP is being replaced by REST, but I am sticking with it for now). Is it possible to use the wildcard this way? I can run the query like this to get some results; but it doesn't match results like DEVCitrix, PRODCitrix:

project="SPDM" AND status="open" AND summary~"Citrix" AND summary~"Requests"'

I would prefer to stay away from plugins if possible...

Thanks

4 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

11 votes
rafaferreira
Contributor
March 2, 2017

For any heavy JIRA user, we do need this feature, I don't want to pay more for any other plugin. Atlassian need to provide this feature.

Kiran01BM
March 17, 2017

Thumbs up! I do feel the same, Is anyone aware of a feature request raised for this ?

swapna.ragi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 9, 2017

I totally agree with this, why should we pay more for this

 Script Runner plugin will help
See comments below

4 votes
Mark Symons
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 Champions.
February 16, 2013

Try the Script Runner plugin. Yes. I know you would prefer to stay away from plugins - but Script Runner is currently free.

The newly-introduced (still Beta) JQL regex offers a issueFieldMatch function that looks like it might help.

3 votes
Deleted user
February 15, 2013
  • no - regular expressions are not supported by JQL -see documentation
  • no - wildcard cannot be on the beginning

Both are restrictions of used searching engine - Lucene.

0 votes
Nick
Contributor
September 15, 2015

Yes, "Script Runner" is good. For example you can matching projects by name pattern

e.g.  project in projectMatch("Dev - *")

See previous answer

 

Also have a look at what you can do matching text fields too (https://confluence.atlassian.com/jira/performing-text-searches-185729616.html)

Mark Risman
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 23, 2016

That seems helpful if you're searching in projects, but the link here for text searches does not currently explain how to search using a regular expression

Comments for this post are closed

Community moderators have prevented the ability to post new answers.