Fix hanging regexp on tables