Better checks for regex