Posted 21 May 2012 - 09:59 AM
I'm trying to make tables into strings, and vice versa, for sending coördinates trough the rednet. I know you can make tables into strings with str = table.concat(table, sep), and then look for the sep when making it into a table again. But, I want "–" as sep, and I then I want to look for a substring ending with –. If you had a sep like "," you could use
string.find(str, '(.-)[^,]')
But now I have – as sep, so I want to look for – and not -. If you usestring.find(str, '(.-)[^--]')
It will look for a substring ending in - or ending in -, right? So, what I was wondering, is there a way to find a substring ending in –? P.S. I don't have a computer with minecraft/computercraft right now, so I have no possibility to test it ingame right now.