Converting a text string to an inline placeholder in a HTML file

Good morning,

I have an issue/problem that I was not able to solve even searching specific posts in the SDL Community forums (or perhaps, I have missed them). Reference: SDL Studio 2017, Build 14.0.5889.5

Suppose you have an HTML file like this:

<html>
<body>
<a id='@@menu.586'>########</a>
<h1>Support request</h1>
<h2>support-request</h2>
<h3>index.php?option=com_breezingforms&amp;view=form</h3>
<h4></h4>
<h5></h5>
<h3>index.php?option=com_content&amp;view=article&amp;id=61</h3>
<h4>Send feedback to Manufacturer</h4>
<h5>Feedback</h5>
<a id='@@menu.247'>********</a>
<a id='@@menu.270'>########</a>
<h1>Feedback received</h1>
<h2>feedback-received</h2>
<h3>index.php?option=com_content&amp;view=article&amp;id=100</h3>
<p>Some text</p>
<h3>index.php?option=com_k2&amp;view=itemlist&amp;layout=user&amp;id=37&amp;task=user</h3>
<ul>
<li><a href="index.php?option=com_content&amp;view=article&amp;id=4&amp;Itemid=175">Some text</a></li>
<li><a href="index.php?option=com_content&amp;view=article&amp;id=5&amp;Itemid=156">Some text</a></li>
</ul>
</body>
</html>

When I load it using the HTML 5 file filter I obtain a preview like this that, in fact, is correct:

but I’d like to “transform” text strings:

index.php?option=com_breezingforms&amp;view=form

index.php?option=com_content&amp;view=article&amp;id=61

index.php?option=com_content&amp;view=article&amp;id=100

index.php?option=com_k2&amp;view=itemlist&amp;layout=user&amp;id=37&amp;task=user

to inline tags.

Provided that the string:

<a href="index.php?option=com_content&amp;view=article&amp;id=4&amp;Itemid=175">

has been already processed by the HTML 5 file filter, I have tried to use the Regex search pattern:

index.php(.*?id=[0-9]{1,4})|(.*?view=form)|(.*?task=user)

but I have not found a way to use it to create an inline tag. And, moreover, this Regex patterns sometimes includes the initial <h3> HTML tag.

Obviously, I can filter segments in SDL Studio and lock them.

I have also tried to use Cleanup Plug-in Tool, but I did not get a successful result.

Where is my mistake, and could anyone suggest a proper solution/procedure to transform these strings to inline tags?

Thank you for your help.

Claudio