Template:Index/name
From Metabolomics.JP
(Difference between revisions)
Line 55: | Line 55: | ||
local idx = {}; | local idx = {}; | ||
for id, names in stdin:gmatch("&&(%w+).Common Name=&&(.+)") do | for id, names in stdin:gmatch("&&(%w+).Common Name=&&(.+)") do | ||
− | + | print(names); | |
− | + | -- for word in string.gmatch(names,"&&[%(%)%[%]%+%-%d%p\"']*([%a]+)[^&]*") do | |
− | + | -- print(word); | |
− | + | -- if ((string.sub(word,0,1) == string.sub(first,0,1)) and | |
− | + | -- (string.byte(first,2) <= string.byte(word,2)) and | |
− | + | -- (string.byte(last,2) >= string.byte(word,2))) | |
− | + | -- then hash[word] = id; table.insert(idx,word); | |
− | end | + | -- end |
− | end | + | -- end |
− | + | -- end | |
+ | -- table.sort(idx); | ||
local output = ""; | local output = ""; | ||
for id, val in pairs(idx) do | for id, val in pairs(idx) do |
Revision as of 15:48, 1 October 2008
名前のインデクス {{{1}}} 最小値(デフォルトaa) {{{2}}} 最大値(デフォルトab) {{{3}}} ページタイトル {{{4}}}ダミー Last updated: 20081001154858
./lua: /tmp/mw_ex_lua_ls2Nt2:21: 'end' expected (to close 'for' at line 5) near '<eof>' |
}} |