[QUEST] Regular Expression

10/17/2013 09:08 poXavincS#1
Hi guys, I want do this regex strings. [Only registered and activated users can see links. Click Here To Register...] name is string.match() from Lua.

I want use to my quest.

How do we do?
Thank you..

Good works..

Edit:

I am added list quest_functions;

string.match
string.find


And my quest in write;

PHP Code:
local tf string.match("123","[0-9]")
if 
tf == 1 then
 say
("It's true")
end 
Not problem..

I am so sorry, I don't trying of checking. I asked your.
10/17/2013 11:20 Benhero#2
try...
PHP Code:
local tf string.match("123","[0-9]{1,}")
if 
tf == 1 then
 say
("It's true")
end 
Greatz Benhero
10/17/2013 15:53 Noa_#3
if you like find and reward all numbers on string use this funktion
PHP Code:
function find_number(str)
    
val=""
    
for key in string.gfind(str,"[0-9]") do
        
val=val..key
    end
    
return tonumber(val)
end 
for example.
PHP Code:
str"string have 13013 numbers"
print(find_number(str))

>> 
13013