[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.4 Back-reference

The back-reference `\n', where n is a single digit, matches the substring previously matched by the nth parenthesized subexpression of the regular expression. For example, `(a)\1' matches `aa'. When use with alternation if the group does not participate in the match, then the back-reference makes the whole match fail. For example, `a(.)|b\1' will not match `ba'. When multiple regular expressions are given with `-e' or from a file `-f file', the back-referecences are local to each expression.



This document was generated by root on January, 23 2002 using texi2html