Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42220

VS 2010 Search for a string in a text file and perform an action

$
0
0
I have a txt file with the following contents:
Code:

[config1]
name = test1
settings = settings1
host = sample.com

[config2]
name = test2
settings = settings2
host = sample2.com

[config3]
name = test3
settings = settings3
host = sample3.com

Now I am trying to the output in a richtextbox as:-

Code:

=====CONFIG1======
Name of the person: test1
Host used: sample.com

=====CONFIG2======
Name of the person: test2
Host used: sample2.com

=====CONFIG3======
Name of the person: test3
Host used: sample3.com


How can I achieve this? I thought of finding the "]" and then getting the values but I am stuck. Is there an easier way?

Viewing all articles
Browse latest Browse all 42220

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>