Getnumber only in lua

A simple question. When a roll has been done it shows as:

".q,Juf5 KINH GUI NGUOI D'UNG . 8 6 8 6 38 SDU.NG CHO MOT LAN GD NHE;;yGkq,W"

I wish for some way to isolate the number 868638. However there is no such thing as a split in lua (as far as I know) so what's the best way to accomplish this?

Upvotes: 0

Views: 116

Answers (1)

DarkWiiPlayer
DarkWiiPlayer

Reputation: 7046

local res = input
   :match(string.rep('%d+%s*', 6))
   :gsub('%D', '')

Upvotes: 1

Related Questions