{"record":{"id":"64c78b73b9a4d8ac","repo":"mikefarah/yq","slug":"unrecognised-match-params-v-please-see-docs-at","errorCode":null,"errorMessage":"unrecognised match params '%v', please see docs at https://mikefarah.gitbook.io/yq/operators/string-operators","messagePattern":"unrecognised match params '(.+?)', please see docs at https://mikefarah\\.gitbook\\.io/yq/operators/string-operators","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/yqlib/operator_strings.go","lineNumber":413,"sourceCode":"\t\tblock := expressionNode.RHS\n\t\tregExExpNode = block.LHS\n\t\treplacementNodes, err := d.GetMatchingNodes(context, block.RHS)\n\t\tif err != nil {\n\t\t\treturn nil, matchPrefs, err\n\t\t}\n\t\tparamText := \"\"\n\t\tif replacementNodes.MatchingNodes.Front() != nil {\n\t\t\tparamText = replacementNodes.MatchingNodes.Front().Value.(*CandidateNode).Value\n\t\t}\n\t\tif strings.Contains(paramText, \"g\") {\n\t\t\tparamText = strings.ReplaceAll(paramText, \"g\", \"\")\n\t\t\tmatchPrefs.Global = true\n\t\t}\n\t\tif strings.Contains(paramText, \"i\") {\n\t\t\treturn nil, matchPrefs, fmt.Errorf(`'i' is not a valid option for match. To ignore case, use an expression like match(\"(?i)cat\")`)\n\t\t}\n\t\tif len(paramText) > 0 {\n\t\t\treturn nil, matchPrefs, fmt.Errorf(`unrecognised match params '%v', please see docs at https://mikefarah.gitbook.io/yq/operators/string-operators`, paramText)\n\t\t}\n\t}\n\n\tregExNodes, err := d.GetMatchingNodes(context.ReadOnlyClone(), regExExpNode)\n\tif err != nil {\n\t\treturn nil, matchPrefs, err\n\t}\n\tlog.Debug(NodesToString(regExNodes.MatchingNodes))\n\tregExStr := \"\"\n\tif regExNodes.MatchingNodes.Front() != nil {\n\t\tregExStr = regExNodes.MatchingNodes.Front().Value.(*CandidateNode).Value\n\t}\n\tlog.Debugf(\"regEx %v\", regExStr)\n\tregEx, err := regexp.Compile(regExStr)\n\treturn regEx, matchPrefs, err\n}\n\nfunc matchOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/mikefarah/yq/blob/8b5af0694bb82b41d4ae180fac9972029066f90a/pkg/yqlib/operator_strings.go#L395-L431","documentation":"After extractMatchArguments consumed the recognised params ('g', and rejecting 'i'), characters remain in the params string of match/capture/test. Only 'g' is a valid parameter — anything else (typos like 'global', 'm', 'n') makes the whole params argument unrecognised, and the error links to the string-operators docs.","triggerScenarios":"Thrown at pkg/yqlib/operator_strings.go:413 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only the supported param 'g' for global matching","For case-insensitivity, put (?i) in the regex itself instead of a param","Drop the params argument entirely if none is needed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8b5af0694bb82b41d4ae180fac9972029066f90a","analyzedAt":"2026-09-05T10:57:22.766Z","contentChangedAt":"2026-09-05T10:57:22.766Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}