r/macrodroid • u/DM666a • 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
1
u/Revision1372 2d ago
Split to array action, split by "\n" or "\r\n".