Jump to content

Module:Sandbox/Wnt

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Wnt (talk | contribs) at 00:56, 16 March 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
local p={}

function p.main(frame)
   local args=frame.args
   local parent=frame:getParent()
   local pargs=parent.args
   local target = frame.args[1] or frame.args.target;
   local teststring="axaaxxaaxxxaaxxxxaaxxxxxaaxxxxxxa"
   local controlatlast=string.gmatch(teststring,"a(.-)a")
   local plainvalue=controlatlast()
   local output=""
   output = output .. "Hmmm, let's see what pops off the top.  " .. plainvalue or "oopsie"
   plainvalue=controlatlast()
   output = output .. "Alright, ready for #2 match.  " .. plainvalue or "uh-oh"
   output = output .. "OK let er rip!  "
   repeat
      x=controlatlast()
      output = output .. (x or "")
   until not x

   return output
end
 
return p