I have a text file to read in (which is not the problem), The file is divided into three sections each with a different heading i.e. block{A}, Block{B} and Block{C}.
After each block is are lines of text, each line contains a word after "#" which I need to capture.
The tricky bit is all the words in block A have a second meaning or weighting. All words in block A have say a weighting of 1, whilst block B a weighting 2 and block C a weighting 3.
These weight values are not present in the text file and the text file cannot be edited to include them.
So I need a method to read the data (not a problem), check which block its in (look for 'Block{*}') then store away the word after '#' with its weighting (1 or 2 or 3).
I need some suggestions as to the best mechanism to store the data so that it can be compared to as a text box is updated character by character.
The text box string is compared (after each key press) to all the words in the text file or the data extracted from it and if their is a match, the weighting value associated with that word is used by the code.