Advanced replace function / wordpress problem

Hi,
I’m quite new to this software. So far I’ve recorded some macros, have managed to save some information as variables and use them later in input fields. Well, that worked fine and was quite easy. But now I’m facing a bit more complicated task and I can’t figure out how and if it can be done. I’m sure it can be done.

So, I have a Wordpress site with about 300-400 pages. Many of them have an old MP3 player that plays some samples of music, and the player does not work anymore. I have a new player plugin and now I need to replace the code in Wordpress HTML (text, not visual) editor.

The code looks about like that:
<a title="Title of the audio" href="/music/sample-of-music.mp3" rel="lightbox"><img src="https://example.com/images/logo.jpg" alt="player" width="29" height="22" /></a> #1 Artist name - Track Name, additional information

And I need it to be converted into this:
[audio src="/music/sample-of-music.mp3"]
#1 Artist name - Track Name, additional information

Now there are many pages… of course it would be awesome if I could fix them all at once with one click, but even if I could do it so that I can fix one page with one click, it would help me a lot. Because doing it manually has proven to be very-very unmotivating.

Can anybody help me out, lead me in the right direction? How can this sort of thing be done?

Thank You in advance & all the best!
John

This is an hard work and require more and more times

Very easy way is, create all new text in a csv after you replace all old text.

It’s an hard work to do require more times and good and precise macro code.