Importing nodes from custom XML feed: how do I convert some XML fields into entity references?
Maybe a bit late...

Do you know the feeds_tamper module?

But - I think you won't get around writing your own feeds_tamper plugin.
You have to parse your input field and search for node IDs, then replace it with the ID, as you wrote. This can not be done with feeds_tamper standard plugins, because even with REGEX-replace you don't have access the node IDs.