From: "Steve Simon" <steve@quintile.net>
To: 9fans@9fans.net
Subject: [9fans] awk, big REs
Date: Fri, 15 Jul 2011 14:05:42 +0100 [thread overview]
Message-ID: <2142d47b30d21e30e6d05a708a0907a8@quintile.net> (raw)
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
next reply other threads:[~2011-07-15 13:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 13:05 Steve Simon [this message]
2011-07-15 13:37 ` Charles Forsyth
2011-07-15 16:28 ` erik quanstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2142d47b30d21e30e6d05a708a0907a8@quintile.net \
--to=steve@quintile.net \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).