home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!swrinde!emory!ogicse!reed!romulus!merlyn
- From: merlyn@ora.com (Randal L. Schwartz)
- Newsgroups: comp.unix.questions
- Subject: Re: File manipulation question
- Message-ID: <MERLYN.93Jan8084158@romulus.reed.edu>
- Date: 8 Jan 93 16:42:03 GMT
- Article-I.D.: romulus.MERLYN.93Jan8084158
- References: <1993Jan7.010450.28001@crpmks.uucp> <1ig9lnINN2ol@news.umbc.edu>
- <1ii4jvINNn85@early-bird.think.com>
- Sender: news@reed.edu (USENET News System)
- Organization: Stonehenge Consulting Services; Portland, Oregon, USA
- Lines: 12
- In-Reply-To: barmar@think.com's message of 7 Jan 1993 20:42:39 GMT
-
- >>>>> In article <1ii4jvINNn85@early-bird.think.com>, barmar@think.com (Barry Margolin) writes:
- Barry> grep "^[A-Z0-9][A-Z0-9][A-Z0-9] [0-9][0-9][0-9][0-9][0-9]" infile > outfile
-
- Or using Perl's curly-brace multipliers:
-
- perl -ne 'print if /^[A-Z0-9]{3} [0-9]{5}/' infile >outfile
-
- Just another Perl hacker,
- --
- Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
- merlyn@ora.com (semi-permanent) merlyn@reed.edu (for newsreading only)
- factoid: "Portland, Oregon, home of the California Raisins and Lone-Star Beer!"
-