i have problems with the pattern itself...i know the function, but this pattern is not exactly like regexp.
my try: function splitfilename() local fn=editor:GetSelText() --output:ReplaceSel(fn) local dirname=string.gsub(fn, "(.*)[^\\]*$", "%1") local filename=string.gsub(fn, "\\([^\\]*)$", "%1") output:ReplaceSel(dirname.."%"..filename) end but this won't work... Frank -------- Original-Nachricht -------- Datum: Sun, 21 Jan 2007 11:47:39 -0300 Von: "Walter Cruz" <[EMAIL PROTECTED]> An: "Discussion of the SciTE editor" <[email protected]> Betreff: Re: [scite] splitting filename (dirname/filename) > Well, SciTE uses Lua 5.0 afaik :) > > http://www.lua.org/manual/5.0/ > > look at string.gsub and string.gfind > > []'s > - Walter -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail _______________________________________________ Scite-interest mailing list [email protected] http://mailman.lyra.org/mailman/listinfo/scite-interest
