Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I use string.match() and what does it do?

I was having trouble understanding what string.match() was and how to use it. Can someone tell me what this does? I looked on the developer website and I didn't quite understand. Thank you!

1 comment

0

String Manipulation is quite a bit more complicated than ellxiac's answer makes it out to be. I recommend reading the Wiki page for reference, as it can take quite a bit of practice. https://developer.roblox.com/en-us/articles/string-patterns-reference

1 answer

string.match() is basically a search.

For example, if you had text = "Hello there!" and did if string.match(text, "Hello") then print(true) end it would print true

This discussion is preserved as it was. New answers, comments, and votes are closed.