Module:Str find word: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 54:
-- then remove them from the string:
-- replaced by single comma; idle & keeps word separation
--- if yesno(tArgs.literals, false) then
if false then
local _, sCount
_, sCount = mw.ustring.gsub(sWordlist, '"', '')
Line 80 ⟶ 81:
-- Step 3: parse comma-delimited words
hitCount = 0
local eSep = escape_word(tArgs.sSep)
table.insert(wordTable, eSep) -- dev
local patstring = '%f[^' .. eSep .. '][^' .. eSep .. ']+%f[' .. eSep .. ']'
while hitCount <= iMaxWords do
hitCount = hitCount + 1
hitWord = str._match(','tArgs.sSep .. sWordlist .. ','tArgs.sSep, '%f[^,][^,]+%f[,]', 1, hitCount, false, ',')
hitWord = mw.text.trim(hitWord)
if hitWord == ',' then