Module:Str find word: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 83:
sWordlist = tArgs.sep .. sWordlist .. tArgs.sep
local eSep
eSep = escape_word(tArgs.sep or '&')
table.insert(wordTable, eSep) -- dev
local patstring = '%f[^' .. eSep .. '][^' .. eSep .. ']+%f[' .. eSep .. ']'
tablereport.insertxpMessage(wordTable, eSep) -- dev
tablereport.insertxpMessage(wordTable, patstring) -- dev
while hitCount <= iMaxWords do
hitCount = hitCount + 1
hitWord = str._match(sWordlist, patstring, 1, hitCount, false, ','tArgs.sep)
hitWord = mw.text.trim(hitWord)
if hitWord == ','tArgs.sep then
-- no more words found in the string
break