Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

CQL filter needed to retrieve only the first word from page title

Mihai Mot March 16, 2025

I have a Confluence space with many similar pages.

I want to create an overview with the pages titles structured alphabetical from A-Z.

I want you to help me please to find the correct filter to show for A only the pages having in their titles the first word starting with A and only the first word.

Now I get all the pages having in their titles other words starting with A, besides the first word, which is an output I don't want.Screenshot 2025-03-17 082640.png

What would be the correct regex expression to be used in the filter "With title" (see attachment).

Thank you.

2 answers

0 votes
Aron Gombas _Midori_
Community Champion
March 17, 2025

I am afraid, you can not do this with the current capabilities of CQL operators.

The best you can get is the "~" operator, but it will test the whole text for match. For your use case, you would need something "more precise", like a regex match.

0 votes
Mihai Mot March 17, 2025

Or how to adjust the below line to get only the first word of the title starting with letter A:

<ac:parameter ac:name="cql">label = "pmt_glossary_term" and parent = "2753668694" and title ~ "A*"</ac:parameter>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events