[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GROUP                        GROUP pattern

    GROUP /re/ { action }
    GROUP /re/ { action }
    GROUP /re/ { action }
    GROUP /re/ { action }

    or

    GROUP /re/
    GROUP /re/ { action }
    GROUP /re/
    GROUP /re/ { action }

    or

    GROUP /re/
    GROUP /re/ { action }
    GROUP /re/
    GROUP /re/

    The pattern  associated with  the GROUP  pattern keyword  may only be a
    single  regular  expression.    All  consecutive GROUP/action pairs are
    grouped and the search for  the regular expressions optimized over  the
    group.  Each regular expression of the GROUP may have a separate action
    associated with it.  In this case the appropriate action is executed if
    the regular expression is matched on the current input record.  If  the
    action for  a regular  expression is  not given,  then the  next action
    explicitly given  is executed.   If  no action  is given  for the  last
    regular expression of a GROUP, then the default action

                                  { print ; }

    is assigned to it.  When one of the regular expressions of the GROUP is
    matched, the built-in variable, NG, is  set equal to the number of  the
    expression.  The numbering of the expressions in the GROUP starts  with
    one, 1.

    There may be more than one  GROUP of regular expression patterns.   Any
    pattern not preceded with the GROUP  keyword will cause a GROUP to  be
    terminated.  The occurrence of the GROUP keyword again will start a  new
    GROUP and the numbering of the new group starts over at one, 1.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson