Hello,
In Confluence I want to search for a specific part of the source Code of my page.
In fact I want to check IF this is part of my source Code:
<tr>
<th> USER </th>
<td>
<div class="content-wrapper">
<p>
<br/>
</p>
</div>
</td>
</tr>
Source Code that Looks like this should not be detected :
<tr>
<th> USER </th>
<td>
<div class="content-wrapper">
<p>
<ac:link>
<ri:user ri:userkey="xxxx"/>
</ac:link>
</p>
</div>
</td>
</tr>
Thanks!
I was going to suggest the Confluence Source Editor, but I found out that it doesn't support multi-line searches.
I think your best bet would be to click the "View Storage Format" option on the ••• menu and search that using something like Notepad++ that supports Regular Expression search. Then you could just search for something like
<th>\s*USER\s*<\/th>\s*<td>\s*<div class="content-wrapper">\s*<p>\s*<br\/>\s*<\/p>
If you want to replace it with something else, you could do a search and replace and use the technique I wrote in this answer to change the source code:
However, this would only work for one page. If you want to do the search on multiple pages, then you might consider using the Confluence CLI app, which I believe also supports regex search.
Hello Stephen,
Thanks a lot for your Reply. Unfortunately, due to my bad description it is not applicable to my problem.
My aim is to Display all pages that have this "string of Code" in its source Code.
Best,
Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.