I’m trying write some code that looks at two data sets and matches them (if match), at the moment I am using **string.find** and this kinda work but its very rigid. For example: it works on **check1** but not on check2/3, as theres a space in the feed or some other word. i like to return a match on all 3 of them but how can i do that? (match by more than 4 characters, maybe?)
check1 = 'jan' check2 = 'janAnd' check3 = 'jan kevin' input = 'jan is friends with kevin' if string.find(input.. "" , check1 ) then print("match on jan") end if string.find( input.. "" , check2 ) then print("match on jan and") end if string.find( input.. "" , check3 ) then print("match on jan kevin") end
PS: i have tried gfind, gmatch, match, but no luck with them