This puts 'name="table1"' in $1 and the content of the table in $2. If the perl you're using is pre-5.10, or if you know your input is 'valid' (that is, each <TABLE> has a matching </TABLE>) use '*' instead of '*+'.$file =~ m{<TABLE \s+ ([^>]*+)> ( [^<]*+ (?: < (?!/TABLE>) [^<]*+ )* ) </TABLE>}x;
In reply to Re: Regex, Newline, Wilcard
by JavaFan
in thread Regex, Newline, Wilcard
by boblawblah
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |