Hi,
I don't have anything to add to the REGEXP discussion in itself, but does the OP also have to take into account that the table-start and table-end can be provided by templates, as can the table contents?
In that case, the initial page wiki text only contains template calls, but after template expansion it will have table syntax.