🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #21

Re: PROBLEM WITH MATCH FUNCTION IN AWK

#21
From: Tom Christiansen
Date: Thu, 29 Oct 1992 17:20
16 lines
1587 bytes
From the keyboard of storpis@salsa.engr.ucdavis.edu (Black Lodge Engineering):
:
:I am trying to use the "match" function in AWK. The following is a simple
:AWK program that uses "match" but doesn't work. Can anyone help me out:
:
:{ MATFLAG = match($0,/??-??-??/) ; print MATFLAG }

Even if you are using the new awk which understands match, you need to
use real egrep regexps, not shell style file-glob notation.

--tomm
-- 
    Tom Christiansen      tchrist@convex.com      convex!tchrist
    If you have ever seen the grim word "login:" on a screen, your mind
    is now a wholly-owned subsidiary of The Death Star.
                John Woods in <14105@ksr.com> of comp.unix.bsd
Technical Details
Message-ID: <1992Oct29.172053.4838@news.eng.convex.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!convex!convex!tchrist
References: <1992Sep15.163829.26987@u.washington.edu> <195f25INN3h2@early-bird.think.com> <18387@ucdavis.ucdavis.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!sun-barr!cs.utexas.edu!convex!convex!tchrist
From: Tom Christiansen <tchrist@convex.COM>
Subject: Re: PROBLEM WITH MATCH FUNCTION IN AWK
Originator: tchrist@pixel.convex.com
Sender: usenet@news.eng.convex.com (news access account)
Message-ID: <1992Oct29.172053.4838@news.eng.convex.com>
Date: Thu, 29 Oct 1992 17:20:53 GMT
Reply-To: tchrist@convex.COM (Tom Christiansen)
References: <1992Sep15.163829.26987@u.washington.edu> <195f25INN3h2@early-bird.think.com> <18387@ucdavis.ucdavis.edu>
Nntp-Posting-Host: pixel.convex.com
Organization: Convex Computer Corporation, Colorado Springs, CO
X-Disclaimer: This message was written by a user at CONVEX Computer
              Corp. The opinions expressed are those of the user and
              not necessarily those of CONVEX.
Lines: 16