How to split string

Hi,

i’m trying to split this string in from 1 cell in my data table

1:14-cv-10864-TLL-SDD
Maye Klee sample

i just need the 1:14-cv-10864.

@JayR
stra=1:14-cv-10864-TLL-SDD
ListB=stra.Split({“-”},stringSplitOptions.RemoveEmptyEntries).ToList

output=string.Join(“-”,ListB.Take(3))

Regards,
Mahesh

4 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.