#!/usr/local/bin/perl while(<>) { s/([^<]+)<\/a>/$1/g; print $_; }