There is a list which adds the string at runtime. The string in the list can be like
List<string> myList=new List<string>();
0 7- 9
1 3 - 6
2 1 -3
3 10-12
Here the string contain in list does not have same pattern. Suppose I want to find the index of 3 - 6. So I have use an expression
3\s*\-\s*6
Now how to use it in Array.Indexof method so that I can get index of this element from mylist.
List<string> myList = new List();should beList<string> myList = new List<string>();shouldn't it? And why Regex? Why not simply use.Find()or.Contains()?