Expand my Community achievements bar.

Regular expression to condition email subject possible?

Avatar

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.

Thanks.

2 Replies

Avatar

Employee

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.

1397060_pastedImage_0.png

Regards,

Adhiyan

Avatar

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.

Thanks,

Arjun