bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk regular expression extensions


From: Stepan Kasal
Subject: Re: gawk regular expression extensions
Date: Sat, 22 Jan 2005 18:04:10 +0100
User-agent: Mutt/1.4.1i

Hi,

On Thu, Jan 20, 2005 at 11:16:51AM -0600, Tony Ernst wrote:
> gawk-3.1.1: gawk treats \B as "the empty string not on a word boundry".
> gawk-3.1.3: gawk treats \B as "the empty string within a word".

not exactly, gawk-3.1.3 sometimes treats \B the old way:
        $echo 'a  '|./gawk '/ \B /'
        a  

The dfa.c code still treats \B the old way, while regcomp.c contains this:

        case 'B':
          if (!(syntax & RE_NO_GNU_OPS))
            {
              token->type = ANCHOR;
              token->opr.ctx_type = INSIDE_WORD;
            }
          break;

The new regex code, imported from GNU libc, thus seems to think that \B
means ``inside word''.

Either the dfa code or the regex code has to be fixed.  But first we have
to determine what the meaning of \B should be.
Arnold, who has the authority to resolve this?

Have a nice day,
        Stepan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]