Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago
Edited 3 years ago

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!

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 Gey4Jesus69 2705 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

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

Ad

Answer this question