I need to edit a page that has a great many spurious embedded hyperlinks on class names. For example, com.mycompany.xx.MyClass has a hyperlink on the com.mycompany.xx package name.
I went into the source editor by clicking the <> button at the right end of the editor toolbar. (I'm not sure whether this is a standard feature of Confluence or a plugin that my company has purchased. :-( )
In any case, I've selected the Regex checkbox and entered the following in the Find field:
<a href=.+?>(.+?)</a>
This pattern finds and selects the full anchor string, exactly as I need, such as this one:
<a href="com.mycompany.xx">com.mycompany.xx</a>
However, putting the following in the Replace field:
\1
and then clicking Replace just replaces the selected text with:
\1
instead of:
com.mycompany.xx
Can someone help me with what the correct syntax is for using the subexpression in the Replace text?
I am a heavy user of the source editor (free plugin), and I have not been able to get that feature to work (annoying, to say the least). The plugin has only got updates to support new versions of Confluence over the last 7 years.
There is a commercial version that also supports RegEx but their documentation is poor, so not sure it has this feature either: source-editor-for-confluence
Yeah, I read their docs too. :-(
Looks like I just have to accept doing the edits manually.
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.