Forum Discussion
CumberlandStree
2 years agoActive Member II
Liquid Code to Exclude Generic Emails such as Yahoo and Hotmail
Hello (and help) I am trying to build liquid code that will exclude users who have non-business email addresses (yahoo, gmail, hotmail etc) and include users with certain words in their job titles ...
- 2 years ago
Hey CumberlandStree! "does not match regex" doesn't look like a valid operator. I think you'd need to go with contains in this instance.
Here's a useful guide to Braze supported liquid operators - https://www.braze.com/docs/user_guide/personalization_and_dynamic_content/liquid/operators/
bob
2 years agoSpecialist
You'll also have an issue with the and/or precedence in that liquid. They are evaluated left to right - there's no implied parentheses. You might need to nest the if statements to get the effect you're thinking of.
The solution doesn't feel great though. I'd suggest some of this logic should be maintained in your CDP (or whatever you have that feeds data into Braze) - then pass cleaner attributes that you can more easily use for segmentation/personalisation.
Related Content
- 9 months ago