Posted 07 February 2016 - 01:26 AM
I already made some question about that kinda of stuff some time ago, but only now i'm having problems and question about that again.
I'm making routers and programs that communicate with others programs. The programs need to split the messages that they receive from the others into blocks (like password$nickname$balance$status) and then process it. And I have not much more characters to use as split pattern without overlapping.
My question is:
Can you split strings using words like:
for token in msg:gmatch("[^%word%]+") do
print(token)
endOutput:
my computer
maybe it has a easy awsner but i'm not able to figure out it.
I'm making routers and programs that communicate with others programs. The programs need to split the messages that they receive from the others into blocks (like password$nickname$balance$status) and then process it. And I have not much more characters to use as split pattern without overlapping.
My question is:
Can you split strings using words like:
Spoiler
msg = "I like %word% my computer"for token in msg:gmatch("[^%word%]+") do
print(token)
end
Spoiler
I likemy computer
maybe it has a easy awsner but i'm not able to figure out it.