Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.n-ix.net!news.belwue.de!news-zh.switch.ch!kanaga.switch.ch!switch.ch!news.uv.es!not-for-mail From: Manuel Collado Newsgroups: comp.lang.awk Subject: Re: Regular expression in awk Date: Wed, 06 Apr 2011 21:07:13 +0200 Organization: Universitat de Valencia Lines: 22 Message-ID: References: <4e09d4fd-8351-45f0-8f17-b6ac0d32e19a@l18g2000yql.googlegroups.com> NNTP-Posting-Host: 188.red-2-137-86.dynamicip.rima-tde.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: peque.uv.es 1302117077 16885 2.137.86.188 (6 Apr 2011 19:11:17 GMT) X-Complaints-To: newsmanager@uv.es NNTP-Posting-Date: Wed, 6 Apr 2011 19:11:17 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.awk:128 El 06/04/2011 19:24, Janis Papanagnou escribió: > On 06.04.2011 16:40, gio001 wrote: >> Hello, >> I have thousand of messages (HL7), > > Provide sample data for a few HL7 records. IIRC, HL7 defines an XML markup for health information exchange. So please provide sample data, so we can see if your message format is XML or plain text. > >> I want to use awk to extract only >> the ones that have a particular value in pv1.18 If your data are XML, then it could be difficult to use plain awk to process them. You could better use the XML extensions of xgawk, or a native XML tool, like an XSLT processor. -- Manuel Collado - http://lml.ls.fi.upm.es/~mcollado