Board Thread:Lua Help/@comment-131168-20140801181839

Hi. I'm testing out some things in Lua and finding half success, trying to combine Lua functionality with what was already there. I'm not sure if I just don't know the way to properly do these things, or if they're not possible and will require coding things differently.


 * 1) Is it possible for a Lua module to read the contents of a page as a string? To display the contents of a template page in a wiki I'd just use   , but telling Lua something like  theinput = ""  just fills theinput with those 16 characters.


 * 1) Is it possible for Lua to output something the wiki will continue to process? Using pattern matching like  result = string.gsub (theinput, "%p(%d%d%d%d)%p", "")  I can get it to find years contained in parentheses and put those years as arguments in another template, but when it outputs to the page it just shows    as if there are nowiki tags around it. 