Improve the regexp to catch system tables on queries controller