Any simple regular expression or string replacement code is probably going to fail in the general case. The only "correct" way to do it is to actually parse the chunk as an SGML/XML snippet and remove the http://
from the value.
For any other (reasonably short) string manipulation code, finding a counterexample that breaks it will be pretty easy.