#!/usr/bin/perl use strict; while (<>) { s/&/&/g; s//>/g; s/ /
/; s#(<)(https?:.*?)(>)#$1$2$3#g; print $_; }