I have a string in Salesforce that contains the to and from addresses of an email, e.g.:

From: sender@gmail.com to: (recip1@yahoo.com, recip2@icloud.com)

A process should set a picklist to internal if that string does only contain @gmail.com and @yahoo.com and set it to external if the string contains another domain.

My process builder formula looks like this:


However, the process always sets the flag to internal right now, no matter if the string contains an external domain or not.

On regextester.com, my expression works correctly: enter image description here

How can I make it work in process builder?

1 Answer 1


The REGEX formula will match if, and only if, the entire string matches the pattern. What this means is that you need to include a wildcard at the beginning:

                                       .+ here means match any number of characters

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.