Fixing preg_match to pass tests