Macro to count instances of RegEx matches above

Dominic Crawford
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!
January 23, 2024

I'm not a groovy programmer, so apologies for anything that is nonsensical here. :)

I want to make a macro that I can add to a page that will count the number of reg-ex matches in the content above it and display that count in the appropriate column of the result table.

I would like to be able to have one that looks at the whole page but ignores the macro text itself or have it look from where it is positioned on the page up to the first horizontal rule it encounters. That way I could have more than one on a page if I need separate tallies.

Before I go engaging on what is likely to be a very painful learning experience, is this even possible?

I'd appreciate any assistance in getting started as well, but honestly, I just don't know enough to know if this is even possible with the Confluence Cloud scriptrunner version and the available API/code options at this moment.

 

Thank you everyone!

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events