[Solved] how to extract those elements from the list which have square bracket in c# [closed]

[ad_1]

Try this

var OuterBrackets_List= lst.Where(s => s.StartsWith("[") && s.EndsWith("]");
var AlphaNumeric_List = lst.Except(OuterBrackets_List);

1

[ad_2]

solved how to extract those elements from the list which have square bracket in c# [closed]