in reply to Regex - backreferencing multiple matches in one group.
Since there are only at most 4, try:
$temp_=~ /\!(\S+?) #tablename \[(.*?)\] #table variables (?:\[(.*?)\] (?:\[(.*?)\] (?:\[(.*?)\])?)?)? \s+.*/x; #white space then rest of text. print Dumper ($1, $2, $3, $4, $5);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex - backreferencing multiple matches in one group.
by Anonymous Monk on Mar 05, 2008 at 18:05 UTC | |
by ysth (Canon) on Mar 05, 2008 at 18:47 UTC |