Finding Subparts of Strings in TXT Doc
Posted on 2007-08-02
I have a TXT document that I want to search for a particular sub-string within other strings. I can currently find the sub-string in its entirety (not part of a larger string), but I also would like to find where other sub-strings exist. For example, if my sub-string is "dri" , I would like the output to Console.Writeline () to be as follows:
...and so on. Therefore, the code would have to find the sub-string (in this case "dri") and return the larger string everywhere in my document where the sub-part is found.