Would it be possible to incorporate a str_replace method with a regular expression, designed to catch url strings in a simple html < textfield > input type?<
str_replace
What you're looking for is preg_replace:
$pg = preg_replace('{regex goes here}', '{replacement goes here}', $pg);