Turn a string into a list

Hello,

I have a string that is like the below. What’s the best way to put this into a list for further processing? I have some inputs where I will need to match/find the correct selection. I need these values in a list for example:

Project 2project 2019
Project testing 2020
Company name 2021
company name 2020 (project)
Company 2 & projecttype1/projecttype2 2020

indent preformatted text by 4 spaces<option value="" selected="selected">-- Select --</option><option value="nkfd98rfnnjdfsed">Project 2project 2019</option><option value="243r3jhfgdfvgd">Project testing 2020</option><option value="kjdf93983">Company name 2021</option><option value="829474hfvkd">company name 2020 (project)</option><option value="hnfer98u9tf">Company 2 &amp; projecttype1/projecttype2 2020</option>

Hi @Sarah_Tang

welcome to forum

how thw list output should like ?

Can u elaborate on that please?

Hi, i have updated my explanation

Hi @Sarah_Tang

still not cleared

what is the output u had provided in the explanation seems to be confusing

@NIVED_NAMBIAR I have extracted dropdown values from a website using get the get attribute activity. I tried to loop through the values to get the uielements, but it is not working and giving me a string. I need to get the dropdown values out into a list like so:

Project 2project 2019
Project testing 2020
Company name 2021
company name 2020 (project)
Company 2 & projecttype1/projecttype2 2020

For getting the dropdown value which attribute did u use ?

@NIVED_NAMBIAR i tried innertext and innerHTML. the string above is innerHTML

Extracting values from a dropdown WE usually do with a find children Filterung on the option Elements from the drop down

Then we Retrieve the values e.g AS a String Array with following statement

Uichildrenvar.select(function (x) x.Get(“innertext”).tostring).toarray