Fix for regex validation