Thread:User talk:CodeCat/Code feasibility question/reply

It's certainly possible, but not purely with anything the wiki software has. You'd need an external program written in a language such as Python (with the pywikibot module) that does the work for you.