awk vs. regular expressions starting with equal sign

Henry Spencer henry at utzoo.UUCP
Wed Dec 12 08:45:25 AEST 1984


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



More information about the Comp.unix.wizards mailing list