How to prevent triggering an action when regex matches NOT 12? | XM Community
Skip to main content
Hello,



I would like to prevent triggering an action (email) every time a phone number starts by 12.



I use embedded data PhoneNumber matches regex ^(?!12).* but I keep receiving the triggered email => unexpected behaviour

If phone number starts by 11, I well receive the triggered email => expected behaviour



Any idea why "Not starting by 12" which is ^(?!12).* doesn't prevent the trigger?



I'm looking forward for your support 😀
Hi @David



This ("^(?!12).*") seems to be working fine for me

Here is a preview link i created with your regex

https://ugamsandbox.ca1.qualtrics.com/jfe/preview/SV_abNzDzoUrn4MxUh?Q_SurveyVersionID=current&Q_CHL=preview
Hi @NiC



Thanks a lot for checking it!



I found the issue 😉 It didn't work because I was using this condition multiple times under the condition [any].



Indeed, if phone number starts by 12 or 38, no trigger should be done. And if it starts by 11, email should be triggered. To make it work I have to add a new condition set [all] as on the picture:



!



Thanks a lot for your help, it reassured me I was on the right direction 😊

Leave a Reply