How can I find specific words inside a string with variations in the middle?

I’ve done some research on this topic but I could only find solutions as to how you can find a specific word inside a string. However, what I’m trying to do is finding the word “wait(number)” for a custom “typewrite” system in which number can be any number. I’ve tried string.match("wait(%d)") but it just prints nil. What am I doing wrong?

1 Like