Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Exclude multiple headings in table of contents

I have multiple headings I'd like to now show up in the table of contents. 

I can get it to not show one of them, but I don't know how to add multiple. 

I saw somewhere online to put this:   (|)

but should there be a space between the heading title and that symbol or after or not at all? 

 

For example I have two headings called "purpose" and "Jump to" - Purpose excluded is working but how do I add "jump to" to also be excluded? 

purpose(|)jump to   ?

Thanks :) 

3 answers

3 votes
Bill Bailey
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.
Jan 07, 2022 • edited

Hello @Addie Hutchins  yes, in the macro settings, there is exclude headings. The docs say:

Filter headings to exclude according to specific criteria. You can use wildcard characters.

If the headings you want to exclude areOverviewandSummary, enterOverview|Summaryin this field.

Full documentation is here https://support.atlassian.com/confluence-cloud/docs/insert-the-table-of-contents-macro/ 

For the example provided in the documentation, any headline with the word "Overview" in it is excluded. Headings with the text "Overview", "Overview of Work", "Executive Overview", "My Overview is the Best Overview" are all excluded.

The correct regex to use to match only "Overview" or "Summary" headings is:

^Overview$|^Summary$

^ is beginning of string. $ is end of string.

Note: TOC does not use any newline characters

Note: The Preview pane is not accurate.

Like # people like this

The Preview Pane is displaying the accurate things for me once I got the format right :) 

@Ryan Canfield thank you! Works for me! Spent ages and couldn't figure out what was wrong.

image.png

I can write RegEx in a heartbeat, if I know that I need to write RegEx! I think the in-app hint is very misleading...

Enter one or more expressions, separated by commas, to filter out certain headings

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 08, 2022

Hi @Addie Hutchins 

No Space is best practice even though space works!!

and case sensitive!!

Thanks,
Pramodh

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events