How to read 1 single string A|B|C|D from Launch and split into 4 entries in evar | Community
Skip to main content
Luca_Lattarini
Level 9
December 16, 2020
Solved

How to read 1 single string A|B|C|D from Launch and split into 4 entries in evar

  • December 16, 2020
  • 2 replies
  • 3449 views

Hello everyone,

 

How can I split this single string A|B|C|D from Launch into 4 differents entries?

Thanks

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

The simplest is with custom code:

 

var str = "A|B|C|D"; var values = str.split("|"); // values = ["A", "B", "C", "D"]

 

 

2 replies

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
December 16, 2020

The simplest is with custom code:

 

var str = "A|B|C|D"; var values = str.split("|"); // values = ["A", "B", "C", "D"]

 

 

Luca_Lattarini
Level 9
December 17, 2020

Hi yuhui, AA receives this string "A|B|C|D" via API. I would like to store in evar X (AA) A, B, C D as single entry not as string

yuhuisg
Community Advisor
Community Advisor
December 16, 2020

--

Luca_Lattarini
Level 9
January 11, 2021
@yuhuisg, I tried to use list2 with API 1.4 but I got an error. It is not supported. I m trying to read the string like this "1|2" by using this regex in Classification Builder((?:[^\\|]+|\\\|?)+). Any idea how to match 1 and 2? I tried ((?:[^\\|]+|\\\|?)+)[1] but it doesnt work.