[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] Re: Regular Search and Replace on a key?



On 30 Jan 2010  "Richard Torrens (lists)" <Lists@xxxxxxxxxxxxxx> 
wrote:

> In article <a0d5c8e150.wra1th@xxxxxxxxxxxxxxx>,
>    Gavin Wraith <gavin@xxxxxxxxxxxxxxx> wrote:
[snip]

>> #! lua
>> do
>> local lines in io
>> local slashdot = \(s)
>>       local slash,dot,pat = '/','.','[%./]'
>>       local swap = { [slash] = dot, [dot] = slash }
>>       => (s:gsub(pat,swap)) end -- function
>> for line in lines(arg[1]) do print(slashdot(line)) end -- for
>> end -- do

> Then if I save that as a Filetype lua and drag it onto the scripts icon of
> a window containing, for instance:

> www/greenbottom/org.tolet.index/html

> It should change it to

> http://www.GreenBottom.org/tolet/index.html


> It does nothing!

Try shift or control drag! Works for me.

Hang on a moment! It changes the slash before html to a dot, but also 
the slashes after http: to dots. Over to Gavin again, I think.

With best wishes,

Peter.

-- 
Peter, \  /      zfc Yb       \     Prestbury, Cheltenham,  Glos. GL52
Anne    \/ __            __    \                              England.
and     / /  \ | | |\ | /  _    \      http://pnyoung.orpheusweb.co.uk
family /  \__/ \_/ | \| \__/     \______________ pnyoung@xxxxxxxxxxxx

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx