How to merge to string values seperated with ,

Hi Team,

Pdf(List variable)–F:\Li\HC_FIN_19055_1-Billing\lib\net45\Data\PDF_Attachments\600247_343301.pdf,
F:\Li\HC_FIN_19055_1-Billing\lib\net45\Data\PDF_Attachments\600237_343301.pdf

From the List variable we need to extract each file path and need to extract number Before “_”(ex 600247)

Step 2:
now after extracting 600247 and 600237 then i need a variable like below

600247,600237

Variable should contain 2 values seperated with ‘,’

Thanks
likitha

hi,
after extracting append the value to another list variable…

@vinjam_likitha

create a list variable and append to that list

cheers

grafik

 myList
 List<string>(2) { "F:\Li\HC_FIN_19055_1-Billing\Lib\net45\Data\PDF_Attachments\600247_343301.pdf", "F:\Li\HC_FIN_19055_1-Billing\Lib\net45\Data\PDF_Attachments\600237_343301.pdf" }
 arrValues =  myList.select(Function (x) Regex.Match(Path.GetFileName(x), "^\d+").Value).toArray
 string[2] { "600247", "600237" }
 String.Join(",", arrValues)
 "600247,600237"

Hi

myList.select(Function (x) Regex.Match(Path.GetFileName(x), “^\d+”).Value).toArray

For the above value i am getting below Error

Thanks
Likitha

import regex to the namespaces:
RegexImport

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

when i imported System.text.RegularExpressions through error value cannot be null

Thanks
Likitha

we dont see the relationship, but cannot derrive all details what you have done. Restart UiPath and open the project again

No Now its working

Thank You