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
BedrockMission!

Learn More

View all

Sign in to view all badges

Regular expression to condition email subject possible?

Avatar

Avatar
Boost 1
Level 1
arjunc24809986
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
arjunc24809986
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
arjunc24809986
Level 1

16-01-2018

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.

Replies

Avatar

Avatar
Establish
Employee
Adhiyan
Employee

Likes

241 likes

Total Posts

343 posts

Correct Reply

124 solutions
Top badges earned
Establish
Give Back 50
Give Back 25
Give Back 10
Give Back 5
View profile

Avatar
Establish
Employee
Adhiyan
Employee

Likes

241 likes

Total Posts

343 posts

Correct Reply

124 solutions
Top badges earned
Establish
Give Back 50
Give Back 25
Give Back 10
Give Back 5
View profile
Adhiyan
Employee

17-01-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.

1397060_pastedImage_0.png

Regards,

Adhiyan

Avatar

Avatar
Boost 1
Level 1
arjunc24809986
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
arjunc24809986
Level 1

Like

1 like

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
arjunc24809986
Level 1

18-01-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