DarkFox Posted February 19, 2009 Share Posted February 19, 2009 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... Link to comment Share on other sites More sharing options...
Authenticity Posted February 19, 2009 Share Posted February 19, 2009 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. Link to comment Share on other sites More sharing options...
DarkFox Posted February 19, 2009 Author Share Posted February 19, 2009 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 Link to comment Share on other sites More sharing options...
Authenticity Posted February 19, 2009 Share Posted February 19, 2009 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? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now