Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Regular expression to condition email subject possible?


Level 1

Hi Team,

I am new to Adobe Campaign and do not know much about the tool's capabilities. Any help would be helpful

Question - I am trying to condition email subject line based on the XML nodes. The only way out for me is to traverse the XML to find a node that start with some character - for example 'XYZ' and find count of no of nodes that are found. Now i am trying to use regex however it isn't working for me. The way i am trying to do is

<% if ( node1.node2.node3.+/^XYZ/g+.length(); == "3" )


     //do something.


It would be helpful if anyone can help me here.


2 Replies



Hello Arjun,

For personalizing the subject line , you could use the conditional If else IF statements from the personalization drop down. Apart , from this I don't regex based on XML will work out.





Level 1

Hi Adhiyan,

Thanks. One of the option provided in the tool is 'Add a script' (just above 'conditional content' that you have highlighted). I was trying to leverage that and write a regex. JS code works fine however the issue is only with regex expression. It would be helpful if you could share details on how to use/include regex.