I have a string which looks like below
Names (as of)
College (University)
Class (abchdf)
I want to remove everything in the brackets and convert this string into array of strings.
The above mentioned is a single string.
How can achieve this ?
I have a string which looks like below
Names (as of)
College (University)
Class (abchdf)
I want to remove everything in the brackets and convert this string into array of strings.
The above mentioned is a single string.
How can achieve this ?
Hi @Abc_Xyz1 ,
Could you check with the below Expression :
Split(Regex.Replace(yourStringVar,"\(.*?\)",""),Environment.NewLine).ToArray
Maybe Regex Split is better suited for this case :
Regex.Split(Regex.Replace(yourStringVar,"\(.*?\)",""),"\r?\n").ToArray
Hi @Abc_Xyz1
You can try with Regular expression
System.Text.RegularExpressions.Regex.Split(System.Text.RegularExpressions.Regex.Replace(Yourstring,"\(\S.*\)",""),"\n").ToArray
Regards
Gokul
When I use this array in for each loop, the first iteration has all 3 elements.
Basically it is taking the 1st item as all 3 mentioned elements.
1st item= Name
College
Class
Yes still the whole is taken as one item instead of 3 strings in array
Could you provide a Screenshot of the implemented part ?
Maybe also check with the Debugging Panel and send it’s Screenshot here.