Hi Gary,

Am Dienstag, 30. Dez 2008, 11:31:14 -0800 schrieb Gary Kline:
> The problem is that there are many, _many_ embedded 
> "<A HREF="http://whatever> Site</A> in my hundreds, or
> thousands, or files.  I only want to delete the
> "http://<junkfoo.com>" lines, _not_ the other Href links.
>
> sed or perl?

Ruby. Untested:

  $ ruby -i.bak -pe 'next if ~/href="([^"]*)"/i and $1 == "http://example.com";' 
somefile.html

Probably you want to do something more sophisticated.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to