Modul:RO: Unterschied zwischen den Versionen

Aus ipsc.de
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 7: Zeile 7:
  local match = '(%d%d-%d%d-%d%d+)'
  local match = '(%d%d-%d%d-%d%d+)'
  local out = match..' -> '
  local out = match..' -> '
  for w in string.gmatch(pt, match) do
  for w in string.gmatch(pt, '(%d%d-%d%d-%d%d+)') do
   out = out..', '..w
   out = out..' '..w
  end
  end
  return out
  return out

Version vom 15. Dezember 2020, 18:21 Uhr

Die Dokumentation für dieses Modul kann unter Modul:RO/Doku erstellt werden

local p = {}

function p.next(frame)
 local page = frame.args[1]
 title  = mw.title .new(page)
 pt = title:getContent()
 local match = '(%d%d-%d%d-%d%d+)'
 local out = match..' -> '
 for w in string.gmatch(pt, '(%d%d-%d%d-%d%d+)') do
  out = out..' '..w
 end
 return out
end

return p