in reply to Re: Regex - backreferencing multiple matches in one group.
in thread Regex - backreferencing multiple matches in one group.

A couple minor suggestions:
Nesting is not needed.
The "\s+.*" at the end does nothing.
/\!(\S+?) #tablename \[(.*?)\] #table variables (?:\[(.*?)\])? (?:\[(.*?)\])? (?:\[(.*?)\])? /x

Replies are listed 'Best First'.
Re^3: Regex - backreferencing multiple matches in one group.
by ysth (Canon) on Mar 05, 2008 at 18:47 UTC
    Nesting is not needed, but more clearly indicates the up-to-4.

    The +.* I grant you, but the \s does do something.