Two different RegEx replacements in one handlebar?

Note that the above also did not work in the flow (resulted in invalid quantifier "?"), but it worked in the dev playground .

For anyone else wondering, the reason that this error occurs is because Javascript does not support lookahead / lookbehind, and "?" is involved in the process. You will need to find a different way to structure your formula that avoids lookaheads/lookbehinds.

Here is how I reconstructed this formula, and this now works in the flow:

{{join "-" (regexMatch OrderItem[*].SellerSKU "\S*") (trim (substring OrderItem[*].SellerSKU (regexSearch OrderItem[*].SellerSKU " ") (regexSearch OrderItem[*].SellerSKU "-FBA")))}}

This other community post/link helped me a lot here, I recommend checking this out if you run into the same issue: https://connective.celigo.com/t/regex-in-handlebar-to-get-everything-after-the-first-whitespace-doesnt-work-during-flow-execution/1086