Hi everyone.
I want to write a Lua script that will do a regex search on the current
document, returning all lines that contain the search string, passed
through the parameter properties.
So far I have:
function Internal()
local m, txt
if props["1"] ~= "" then
print( ">Internal: [" .. props["1"] .. "]");
for m in editor:match( "^.+" .. props["1"] .. ".+$",
SCFIND_REGEXP, 0) do
txt = m.text;
print(editor:LineFromPosition(m.pos) .. " " .. txt);
end
print( "<Internal: [" .. props["1"] .. "]");
end
end
But it does not find antthing. If I change the match expression to
simply be:
editor:match( props["1"], SCFIND_REGEXP, 0)
it returns matches but only the string itself, I want the entire line
Any suggestions...
April
--
Don't go away mad, just go away...
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest