Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cats = "TANK SUB ZEPPELIN HORSE AIR"
- local noTargetCategory = "ZEPPELIN AIR"
- local Onlytargetcategory = ""
- for c in cats :gmatch("%w+") do
- if string.find(noTargetCategory, c) == nil then
- Onlytargetcategory = Onlytargetcategory .. c .. " "
- end
- end
- io.write ("\nnoTargetCategory was:"..noTargetCategory .. "\n")
- io.write ("and now Onlytargetcategory is:"..Onlytargetcategory )
- ---
- noTargetCategory was:ZEPPELIN AIR
- and now Onlytargetcategory is:TANK SUB HORSE
Advertisement
Add Comment
Please, Sign In to add comment