I’m trying to play around with some data from a game using python(I’m also open to view other proramming/script languages for my problem).
The data I want and I’m pulling are coming from a long .lua file and are all in one single line. I want to break up this long line thats containing data into segments/make a table or json of the data contained in that line.
I tried to google a bit but the results i found were just splitting up “short blablabla sentences with a n ” new line indicator manualy added. That’s not what I need here, I need a way to split parts of my one big line of data into single objects that I can work with.
The line is starting like this and the example contains the first 4 sets of data i wanna pull out:
[start of line]select(2, ...).LoadData("AUCTIONDB_REALM_DATA","Lakeshire-Alliance",[[return {downloadTime=1718680714,fields={"itemString","minBuyout","numAuctions","marketValueRecent"},data={{41444,2NSF,4,2SOM},{52106,2UN5,L,2UN5},{8188,1534,6,1534},{12013,NAHJ,3,NAHJ},[even more data]
The data I want to work with are starting after
data={
each of the objects following are within a new pair of {} containing 4 different values.
after the last object the line is closing with
}}]]) --<AUCTIONDB_REALM_DATA,Lakeshire-Alliance,1718680714>
Pastebin to the full line, yes a single line:
https://pastebin.com/XpJZuznk
Mrroach is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.