@_Tommy I don’t know anything about objective c, but a google search came up with “rangeOfString” to find a string within another string. I don’t know if there’s any parameters that can be used with "rangeOfString” to make it like gmatch. Either you can look for more info on that, or wait for someone who knows objective c to give you a better answer.
This is a forum for discussion about Codea, Objective-C is off topic. You would be better served asking your question on Stackoverflow.
@hitachisupport Consider this a warning. I have no idea if the code you posted is relevant or where it came from, but keep your posts on topic and do not include links to irrelevant websites. Such behaviour is considered spamming and will result in you being banned.
I am closing this discussion as it is off-topic for this forum.