For example - "I like apples and pie" how can I find "apples" and nothing else of the string?
1 | local str = "Hello World!" |
2 |
3 | local match = string.match(str, "World!" ) |
4 | -- This would return either "World!" or nil. |
1 | local string = "I like apples and pie" |
2 | if string:find( "apples" ) then |
3 | --stuff |
4 | end |
i hope this works