Regular expression to condition email subject possible? | Community
Skip to main content
January 16, 2018

Regular expression to condition email subject possible?

  • January 16, 2018
  • 1 reply
  • 1431 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Adhiyan
Adobe Employee
Adobe Employee
January 17, 2018

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.

Regards,

Adhiyan

January 18, 2018

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