With pattern-match, it constructs the outputs from the regex. The idea is you write regular regex, then reformat the capture groups into “ICON capture groups” that contain a name. This name becomes the variable output by the step.
For example, you have a list of vulnerabilities like this:
Vulnerability: CVE-2017-0108
Vulnerability: CVE-2019-9098
You’d use regular regex to extract the CVE like so: Vulnerability:\s+(CVE-\d{4}-\d{4})
In ICON, to extract the CVE into a variable called CVE, you’d replace the ( with {{CVE:/ and the ) with /}} so you’re regex would be Vulnerability:\s+{{CVE:/CVE-\d{4}-\d{4}/}}
Once you’ve put an “ICON named capture group” inside the regex, the step output will automatically update to include the variable. If you select “multiple matches” checkbox, it’ll output an array of strings for the variable. If “multiple matches” is unchecked, it’ll output just a string with the first match.
