Dear Masters, Help me out by giving logic for this problem

Here is the data
{Roll no: A1B324; Phone no: 9xxxxxxxxx; City: Mumbai; Gender: Male}
I need to copy the above Roll no, Phone no, City, and Gender and paste them to the web.
But for every transaction, the order of the above data changes dynamically. For instance…
{ City: Mumbai; Phone no: 9xxxxxxxxx; Gender: Male; Roll no: A1B324;}
Now how to copy when it changes dynamically. Pls give a solution.Tq

Hi @lakshmi_narayana_ch
Please extract it by regular expression


We can achieve it using Dictionary and string manipulation, as the following, for example.

dict = yourString.Trim({"{"c,"}"c}).Trim.Split({";"c},StringSplitoptions.RemoveEmptyEntries).ToDictionary(Function(s) s.Split(":"c)(0).Trim,Function(s)  s.Split(":"c)(1).Trim) (2.5 KB)


you can create input like dictionary format and even order is change it will work

Hello @lakshmi_narayana_ch

How are you getting this data? Is it through some json file or some text file?

Also is the number of keys the same or will it change? You can do it in multiple ways, but as the format is changing better to go with dictionary method as sugegsted by @Yoichi

Otherwise you will have to do multiple splits to achieve this.

HiSir, Thank u for ur info. It is working.