How to fetch string between two special characters?

Certified Associate Developer

Hello,

 

I have a set of variables and values in a form of string. All I want is to fetch each n every Key/Value pair from the string as a separate variable value

 

for eg: Lets say my string is as below stored in "local!mixedString" variable

 

"Name:Vivek|Work:Development|Tool:Appian|Experience:2 years|.... So on"

 

Now as we can see each Key/Value pair is separated by "|" symbol. Can someone please help me to separate each value in different variables?

 

So my desired output will be

Name:Vivek

Work:Development

Tool:Appian

Experience:2 years,

 

Where Name,Work,Tool and experience is now become a variable having the same value as it is in the first string variable

 

FYI: The string is dynamic and the list of Key/Value pair changes everytime based on some specific condition.

  Discussion posts and replies are publicly visible