Paterns

How would i use string.find to get 4 numbers and a sentance from the following string.
“255,100,24,19,hello world i have 45 cats in my anus”
Ive been trying to figure this all day so far all i can get is the numbers.

Using string.match would likely be easier:


local n1, n2, n3, n4, str = string.match(s, "^([0-9]+),([0-9]+),([0-9]+),([0-9]+),(.+)$")