Sign in to follow this  
Followers 0
DarkFox

reading from a text file

4 posts in this topic

i have a text file that contains a list of somethings and what every thing of these things refers to.

for example:-

a :value 1

b :value 2

c :value 3

the text file must be in this form for some reasons.

i know about fileopen and fileread commands but i want my script to searching the right values and give my what every value is refers to

that means i want my script to consider that :

a = value 1 or value 1 = a and so on for other values

please help me in that

regards...

Share this post


Link to post
Share on other sites



What do you mean by "the text file must be in this form for some reasons."? Can't you add a section like [section1] and use IniReadSection instead? Another approach will be to use StringRegExp function with restricted pattern to match only this structure and nothing but it.

Share this post


Link to post
Share on other sites

I am so sorry to tell you that this must be a text file because this text file is generated by other tool

and this other tool can not generate ini file .

so my script must search inside this text file for the information i ask it to search and return with the result

and thank you for your help

Share this post


Link to post
Share on other sites

No problem at all, copying the file to an INI file and parsing it can be another approach, unless you're trying to keep touch with constantly updated file? Use MemoryMappedFile instead if so... Give some code so we see what you got?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0