From owner-freebsd-questions@FreeBSD.ORG Fri Dec 9 22:42:17 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2686E16A41F for ; Fri, 9 Dec 2005 22:42:17 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BF6243D60 for ; Fri, 9 Dec 2005 22:42:16 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so997589nzo for ; Fri, 09 Dec 2005 14:42:16 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HbiAP87owudoTZdebcEpwZ73ZLrsV57M3h+pduBVnY3DQh+Ftr3BRwWK9o7ecy2fn8PZCwefosGK+m8cMt+YO6sIG+/WvGm6606j/ssBR1+YE9Kby/oSvIDpxT/0D+tlUwhQJwGikoqCfgqop+HNdJuPwFvc9bzsbMTJ3Ke5BYw= Received: by 10.36.250.67 with SMTP id x67mr3944732nzh; Fri, 09 Dec 2005 14:42:15 -0800 (PST) Received: by 10.37.20.33 with HTTP; Fri, 9 Dec 2005 14:42:15 -0800 (PST) Message-ID: Date: Sat, 10 Dec 2005 01:42:15 +0300 From: "Andrew P." To: Martin McCormick In-Reply-To: <200512092212.jB9MCQhn092277@dc.cis.okstate.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200512092212.jB9MCQhn092277@dc.cis.okstate.edu> Cc: freebsd-questions@freebsd.org Subject: Re: Regular Expression Trouble 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: Fri, 09 Dec 2005 22:42:17 -0000 On 12/10/05, Martin McCormick wrote: > After reading a bit about extended regular expressions and > having a few actually work correctly in sed scripts, I tried one in > egrep and it isn't working although there are no errors. > > I was hoping to get only the A records from a dns zone file so > the expression I used is: > > egrep [[:space:]IN[:space:]A[:space:]] zone_file >h0 > > Had it worked, all that would have appeared in the h0 file was > all the A or Address records. Instead, I get those plus almost > everything else in the file. It is obviously not filtering correctly. > Plain grep produces a 0-length output file so that is not too useful > either. Putting double quotes around the RE didn't help either. > > It seems to match almost everything. > > Thanks for any good ideas. > > Martin McCormick WB5AGZ Stillwater, OK > OSU Information Technology Department Network Operations Group > .-- -... ..... .- --. --.. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" > Isn't it a character class consisting of a white-space and three letters?