Use proper method for regex.