And, yes, I prompt the user of the script to ensure the strings it has chosen from an html file are indeed ones that currently contain IP addresses, and are ones they would like updated in the future :-)
ie: I'm not relying on my shoddy coding alone.