URL's in regular expressions

Gordon Marx gcmarx-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon Dec 14 10:56:16 EST 2009


On Mon, Dec 14, 2009 at 10:41 AM, Bill Horne
<ttrmt-9Ys0Lnm7GY0339nkgaCO/3viChZXdy27 at public.gmane.org> wrote:
> All suggestions welcome. TIA.
>
> sed '/<http:/!s/\(http:\/\/[-A-Za-z0-9:#@%/;$()~_?+=\\\.&]*\)/<a href="\1">\1<\/a>/g' c3 >c4a

Are you stuck with sed, or are we allowed to use Perl, which could
look cleaner and be more maintainable?

Gordon





More information about the Discuss mailing list