|
numerical wildcard capture
|
Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
Archibald
(12 posts) bio
|
| Date |
Tue 25 Nov 2008 03:19 AM (UTC) [ quote
] |
| Message |
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! | top |
|
| Posted by |
Ked
Russia (524 posts) bio
|
| Date |
Reply #1 on Tue 25 Nov 2008 08:09 AM (UTC) [ quote
] |
| Message |
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
| top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
1,624 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )