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

Get digits + periods from a string?

I'm trying to get digits + periods from a string and I can't seem to find the right way to do it.

Here's my current code:

example = "blahblah at 25.132.69.69"
print( example:match("%d+%p+") )

Anyone care to help?

1 answer

Perhaps your capture should look more like [%d.]+ which will allow it to capture a sequence of digits and stops

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