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
Hi,
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)
Sample20220604-1a.zip (2.5 KB)
Regards,
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.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.