Fixed regular expression for mysql + fix on is_table