Trying to concatenate a regex

So I built a process that grabs some json text and pushes it into a call. I’m then sending a slack message confirming the tables that are being updated in the REST API. I’m trying to find a way to make that message back cleaner- and had ChatGPT write me some node.js (since I’m new to node.js). I can’t figure out how to reference a previous step in the script- but doesn’t seem to like anything I try. Anyone here know how to resolve this?

const inputStr = {{steps.extract_by_regular_expression.$return_value[0].match}} —This is the step I can’t get to work

const regexPattern = /“table”:\s*“([^”]+)"/g;

const matches = […inputStr.matchAll(regexPattern)];

// Extract the matched values and join them into a single comma-separated string

const result = matches.map(match => match[1]).join(', ');

console.log(result);

Right now I am just sending through the initial call as confirmation— but I Can’t get the extract_by_regular_expression function to concatenate the different groups together!