Azure AD Provisioning regex | guidance

Solution for Azure AD Provisioning regex | guidance
is Given Below:

Basically I am trying to write a regular expression to replace any userPrincipalName – and take the DOMAIN name and replace it with a different domain for provisioning.

  1. Originally I was using: Replace([userPrincipalName], “@domain1.com”, “”, “”, “@domain3.com”, “”, “”) – this is using the SOURCE key

  2. NOW I want to use: Replace([userPrincipalName], “”, “”, “”, “@domain.com”, “”, “”) instead because I have essentially multiple source keys I need to replace. I can’t seem to get a regular expression to work that looks up multiple domain names.
    Ie I want to replace @domain1.com and @domain1.onmicrosoft.com

Here is the article I have been referencing:
Reference for writing expressions for attribute mappings in Azure Active Directory

I am using this RegEx for Azure AD provisioning with G-suite.

Thanks in advance.