I have a notepad. In that notepad I need to capture an information “ABCD” 012345. The problem is that this information changes its location every day. Day A is on line 300. Day B is on line 400. Day C is on line 350. I have extracted that information “012345” with static line location. How can I capture the location of the “ABCD” field. I need the get the value “012345”.
I have variable.split(Environment.Newline.ToCharArray(index position )
Actually . Its works as : variable.split(Environment.Newline.ToCharArray(350 ), but i know the Monday will not work, because the ABCD field will not be at location 350.
With regular expressions, you don’t need to care about which line the information is located on. It will find the information as long as the pattern matches.
You need to change ABCDE to your field name of course. inputText is a string with the text from Notepad and matchedValue is a string variable that will contain the information you are looking for.