Article View: net.bugs.v7
Article #146awk vs. regular expressions starting with equal sign
From: Henry Spencer
Date: Tue, 11 Dec 1984 22:45
Date: Tue, 11 Dec 1984 22:45
9 lines
1018 bytes
1018 bytes
There is a fundamental lexical ambiguity in awk: when you see "/=",
is this the divide-by-and-assign operator, or the start of a regular
expression which happens to begin with an equal sign? Awk thinks it
is the operator, which means you can't start a regular expression with
an equal sign, ever. To really write such a pattern, you have to resort
to schemes like "/.=/" or "/.*=/". How annoying. I can see no real fix.
--
Henry Spencer @ U of Toronto Zoology
{allegra,ihnp4,linus,decvax}!utzoo!henry
Technical Details
Message-ID:
<4770@utzoo.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!henryShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: net.bugs.v7,net.unix-wizards Subject: awk vs. regular expressions starting with equal sign Message-ID: <4770@utzoo.UUCP> Date: Tue, 11-Dec-84 17:45:25 EST Article-I.D.: utzoo.4770 Posted: Tue Dec 11 17:45:25 1984 Date-Received: Tue, 11-Dec-84 17:45:25 EST Organization: U of Toronto Zoology Lines: 9