From owner-freebsd-questions@FreeBSD.ORG Tue Dec 30 21:16:36 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C0CF1065672 for ; Tue, 30 Dec 2008 21:16:36 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id E1A458FC13 for ; Tue, 30 Dec 2008 21:16:35 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from marge.bs.l (e180013165.adsl.alicedsl.de [85.180.13.165]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1LHlx414JD-0000Zt; Tue, 30 Dec 2008 22:16:34 +0100 Received: from bsch by marge.bs.l with local (Exim 4.69) (envelope-from ) id 1LHlx3-0006RA-OU; Tue, 30 Dec 2008 22:16:33 +0100 Date: Tue, 30 Dec 2008 22:16:33 +0100 From: Bertram Scharpf To: Gary Kline , freebsd-questions@freebsd.org Message-ID: <20081230211633.GA24525@marge.bs.l> Mail-Followup-To: Gary Kline , freebsd-questions@freebsd.org References: <20081230193111.GA32641@thought.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081230193111.GA32641@thought.org> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: Bertram Scharpf X-Provags-ID: V01U2FsdGVkX1+yHhI/yzfLe/Xc4JO+xwl3g8m1jkPtulheZy8 0I9xtu3bakI0KnKigNc/5qoZMwVv837peoG2PhaEMOhDPwJt/C WZMIMhJfAmduGnKZiJXelpi1IgLBGy5vsAT8d9Qijk= Cc: Subject: Re: well, blew it... sed or perl q again. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Dec 2008 21:16:36 -0000 Hi Gary, Am Dienstag, 30. Dez 2008, 11:31:14 -0800 schrieb Gary Kline: > The problem is that there are many, _many_ embedded > "" 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