function processRegexGroups({ segment, transaction, groups = [], regexMatch }) {
  for (const g of groups) {
    const value = regexMatch[g.group]
    if (g?.regex?.statement && value) {
      processRegex({ segment, transaction, regex: g.regex, value })
    } else if (g?.name && value) {
      assignToTarget({
        segment,
        target: g.target,
        transaction,
        name: g.name,
        value
      })
    }
  }
}
Processes the regex groups and adds attributes to the segment based on the regex match.
@param {object} params - The parameters for the regex group processing.
@param {object} params.segment - The segment to add attributes to.
@param {object} params.transaction - The transaction object.
@param {Array} params.groups - The regex groups to process.
@param {object} params.regexMatch - The regex match object containing the matched groups.