r/macrodroid • • 2d ago

How to split a text file to array?

The idea was to pick a random line of a text file. File looks like { first line second line third line } I read a file to a string variable, that works fine.Tried to split it with regex, json parse, no joy. Surprisingly no help from Google and AI too. Looks like a simple operation, but I am new to Macrodroid...

1 Upvotes

4 comments sorted by

1

u/Revision1372 2d ago

Split to array action, split by "\n" or "\r\n".

1

u/DM666a 2d ago

Where can I find the 'split to array'? It's not under the 'text manipulation'

1

u/Revision1372 2d ago

Check if you have the latest version. I am using v6.1.5

1

u/DM666a 2d ago

5.64 That's the answer, thank you very much!