numerical wildcard capture

Posted by Archibald on Tue 25 Nov 2008 03:19 AM — 3 posts, 16,462 views.

#0
Hi there. I searched the website and the help files in hopes of an answer to this question, but I have not had any luck so here I am posting.

This is what I want to do. I want to capture a specific set of numbers 0-25 in a wildcard trigger. This is the line:

Without further performance, the song will end in 130 seconds.
(^Without further performance, the song will end in (.*?) seconds.$)

I was thinking I could do something like (.*?<=25) but that didnt work. Someone told me try CInt, but I think thats VBscript, and it didnt work. If anyone knows how I can do that I really appreciate it you could help me.

Also, if someone could point me to where I can learn about basic lua logic arguements (like for vb its If/else/etc) that would also be great!
Russia #1
For the trigger you can use ([0-9]|1[0-9]|2[0-5]), which is ugly but straightforward and works.

For Lua, you can check out the Programming in Lua book and the manual at http://lua.org/docs

Although there isn't much magic to if in Lua:

if something_is_true then
 -- do something
elseif something_else_is_true then
 -- do something else
else
 -- do something else entirely
end
#2
Cool, it works :D

Thanks!