Skip Navigation
Regex e-mail error via Connect API create/update operations
Answer ID 9714   |   Last Review Date 03/15/2019

Why am I getting REGEX errors when creating/updating contact e-mails via API Operations?


Version May 2017 and earlier, Connect Common object Model (CCOM) version 1.3 and earlier


Getting REGEX e-mail errors when creating/updating contacts via API operations.


Email address validation is handled by regular expressions configured within the Oracle B2C Service product, and prior to the May 2017 product version all API operations use a hard-coded value for the regular expression. As a result, in previous product versions the value is not configurable.

In the May 2017 product version the regular expression used by Connect Web Services for SOAP (CWS) API operations is controlled by a configuration available to the Support team. Similarly, in the August 2017 product version this configuration is also applied to the Connect for PHP (CPHP) API email address validation.

When you encounter errors related to API contact operations, which can slightly differ depending on the contact fields used, this is the expected behavior, because the API REGEX is hardcoded in the product.

Actual REGEX for Oracle APIs (prior to May 2017 version, Connect Common object Model (CCOM) version 1.3 and earlier):

^((([-_!#$%&'*+/=?^~`{|}\w]+([.][-_!#$%&'*+/=?^~`{|}\w]*)*)|("[^"]+"))@[0-9A-Za-z]+([\-]+[0-9A-Za-z]+)*(\.[0-9A-Za-z]+([\-]+[0-9A-Za-z]+)*)+[;, ]*)+$

Example of a REST API error which may be received when performing API contact e-mail operations:

{      "type": "",

     "title": "An attempt to write the resource failed",

     "status": 400,

     "detail": "A problem setting a property was encountered: Pattern does not match: value '' does not match pattern '^((([-_!#$%&'*+/=?^~`{|}\w]+([.][-_!#$%&'*+/=?^~`{|}\w]*)*)|("[^"]+"))@[0-9A-Za-z]+([\-]+[0-9A-Za-z]+)*(\.[0-9A-Za-z]+([\-]+[0-9A-Za-z]+)*)+[;, ]*)+$ '; Contact.Emails[].Field used by customer",

"instance": "https://",

"o:errorCode": "OSC-CREST-00006"