I want to automatically change links like this:
<a href="https://www.burning-glass.com/wp-content/uploads/rebooting_jobs_2017.pdf">Rebooting Jobs: How computer science skills spread in the job market</a>
To this:
<pre><a href="https://www.burning-glass.com/wp-content/uploads/rebooting_jobs_2017.pdf" title="Rebooting Jobs: How computer science skills spread in the job market ">Rebooting Jobs: How computer science skills spread in the job market</a>
It's to make links across my site more acessiblefor the blind.
A friend who knows regex suggested I use
Quote:
<(a href=[^>]*)>([^<]*)<\/a>>
to make the two groups and
Quote:
<$1 title="$2">$2
To do the replacement. I used
Regex101 and it seemed to work fine at first, but for no reason I can find it sometimes now refuses to match any terms! Can anyone suggest a rephrase of the first search string to make it work as needed?
What I have tried:
A friend who knows regex suggested I use <(a href=[^>]*)>([^<]*)<\/a> to make the two groups and
><$1 title="$2">$2
To do the replacement. I used Regex101 to do the work (using PCRE (PHP) and it seemed to work fine at first, but for no reason I can find it sometimes now refuses to match any terms! Can anyone suggest a rephrase of the first search string to make it work as needed?