I read a field from a custom object that has two email addresses separated by a comma and a space.
“xyz@func.com, wrt@func.com”
I need to get each email address and send an email.
I am new to this so any suggestions are welcome.
I think I may need to do two expression, one to extract each email
-R
Best answer by Rizwan322
To extract two email addresses from a field in a custom object using a reader and expression builder:
1. **Use the Reader**: Access the field in the custom object that contains the email addresses.
2. **Apply Expression Builder**: - For the first email: Use a regex or string function to extract the first email address. - For the second email: Apply a similar regex or string function to extract the second email address.
Example regex for extracting emails: - First email: `(\S+@\S+\.\S+)` - Second email: Use appropriate logic to handle the position or delimiter if the emails are separated.
To extract two email addresses from a field in a custom object using a reader and expression builder:
1. **Use the Reader**: Access the field in the custom object that contains the email addresses.
2. **Apply Expression Builder**: - For the first email: Use a regex or string function to extract the first email address. - For the second email: Apply a similar regex or string function to extract the second email address.
Example regex for extracting emails: - First email: `(\S+@\S+\.\S+)` - Second email: Use appropriate logic to handle the position or delimiter if the emails are separated.