I have a field, called bodytext, in a MySQL database. It's a mediumtext field. In the paragraphs of text there are links scattered, formatted like this:
<link news/single-news-page/article/airbus-opens-a320-line-in-tianjin-18102/ _blank>A320 final assembly</link>
Note the last section of the link (18102). They're all formatted like that, with the ID last - though not always 5 digits, they start at the low 20's.
The new link needs to be:
<a href="?q=node/18102">A320 final assembly</a>
Yes, I'm moving from an old CMS into Drupal.