I am trying to parse a text file that contains a bunch of test questions/answers to code a multiple choice test taker.
The questions and answers are all on separate lines so I need to read each file line by line and somehow parse it by just using html/javascript/jquery.
How would I do this? THANKS!
The text file has the extension .dat but is actually a text file. Its just the format these come in and there are too many to change... http://www.mediafire.com/?17bggsa47u4ukmx
To get started try using regexp.
The following expression will split your text on every $$[number] occasion. From there you can brute force slice and cut and chop your string further.
Example code:
try this
to use this you'll need to be running the website on a server (a local server is fine).