Architect Expression Regex for Phone Number Formatting to E.164 Compatible Structure

Could someone explain the correct syntax for an Architect expression that transforms a phone number from +1XXXXXXXXXX format into (XXX) XXX-XXXX? I am building a screen pop integration via Data Actions to push caller details into Salesforce. The incoming call.from data is clean E.164, but our Salesforce phone field expects the formatted string for display purposes in the contact sync logic.

I have attempted to use the replace function with a regex pattern, but the expression evaluator seems to choke on the capture groups or the parentheses. Here is the current expression I am testing:

replace(replace(replace(call.from, '^\+(\d{1,3})(\d{3})(\d{3})(\d{4})$', '($2) $3-$4'), '-', ''), ' ', '')

This returns the raw number unchanged. I suspect the regular expression engine in Architect does not support the standard JavaScript-style capture groups I am using. Is there a supported way to format this directly in the Data Action mapping, or should I handle this transformation in the Salesforce REST API payload before posting? I want to avoid a custom middleware step if possible.