I need to change:
However, the first for the first [something2] I need to replace special characters like whitespaces before i rewrite it. So this wouldn't work:
$content=~s /<previous art_id=\"[a-zA-Z0-9._-]+\">(.*)<\/previous>/<a href=\"$1\">$1<\/a>/gi;
Because the first $1 still has characters that I want to replace for links.
For an actual example:
<previous art_id="insurance">Homeowner's Insurance</previous>
needs to be
<a href="Homeowner's+Insurance">Homeowner's Insurance</a>
Thanks for the help in advance! Hope I made everything clear enough.