From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <2142d47b30d21e30e6d05a708a0907a8@quintile.net> From: "Steve Simon" Date: Fri, 15 Jul 2011 14:05:42 +0100 To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] awk, big REs Topicbox-Message-UUID: 016d9fe4-ead7-11e9-9d60-3106f5b1d025 I am trying to run configure for a GNU project on plan9. yes I know, but stay with me... it mostly works but part of the configure script fails where it runs awk over a header file and uses a rather sill RE to find all defines/undefines. /^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)// { print; } For some reasone they don't like character class ranges, and if I replaces the lists with ranges the RE works as I expect, /^[\t ]*#[\t ]*(define|undef)[\t ]+[_a-zA-Z][_a-zA-Z0-9]*([\t (]|$)/ { print; } I looked at the awk source and even upped MAXRE - though its existing value of 512 looks fine to me. anyone any ideas why awk might not match with an RE like this? -Steve