Very quick Question about LUA pattern match

Posted by Zantiln on Tue 11 Nov 2008 09:36 PM — 4 posts, 16,004 views.

#0
Just had a real quick question about LUA pattern matching, since it doesn't use POSIX regex's...

Would the LUA pattern match below
Quote:
^(?<inum>%d*)%s-%s(?<seller>.*)%s*(?<iname>.*)%s*(?<ilevel>%d*)%s*(?<ibid>%d*)%s*(?<itime>%d*)$

match the following strings?
Quote:
283 - Newfoundling >.: Knee-High Rumors :.< 71 10,000 88

Quote:
284 - Honid the Dagger of Binding 20 1,000,000 36

Quote:
960 - Zantiln an Aylorian Dirk 1 100 86


Anyone see a more effecient way to word the pattern match?
#1
Those 3 strings were supposed to have more spaces inbetween the words but didn't display correctly when i used the quote codes. So i'm gunna try to paste them without quotes below...

283 - Newfoundling >.: Knee-High Rumors :.< 71 10,000 88
284 - Honid the Dagger of Binding 20 1,000,000 36
960 - Zantiln an Aylorian Dirk 1 100 86
#2
Ok, so that didn't work either, this time, trying it by replacing all the spaces with #'s....

283#-#Newfoundling#>.:#Knee-High#Rumors#:.<#############71#########10,000###88
284#-#Honid########the#Dagger#of#Binding################20######1,000,000###36
960#-#Zantiln######an#Aylorian#Dirk######################1############100###86
Australia Forum Administrator #3
Lua pattern matching does not have named wildcards, so you need to drop this stuff:


?<inum>


Also Lua is not an acronym, so to capitalized correctly it is Lua, not LUA.