Template:Index/name

From Metabolomics.JP
(Difference between revisions)
Jump to: navigation, search
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
    for word in string.gmatch(names,"&&[%(%)%[%]%+%-%d%p\"']*([%a]+)[^&]*") do
+
  print(names);
      print(word);
+
--  for word in string.gmatch(names,"&&[%(%)%[%]%+%-%d%p\"']*([%a]+)[^&]*") do
      if ((string.sub(word,0,1) == string.sub(first,0,1)) and
+
--      print(word);
        (string.byte(first,2) <= string.byte(word,2)) and
+
--      if ((string.sub(word,0,1) == string.sub(first,0,1)) and
        (string.byte(last,2) >= string.byte(word,2)))
+
--        (string.byte(first,2) <= string.byte(word,2)) and
      then hash[word] = id; table.insert(idx,word);
+
--        (string.byte(last,2) >= string.byte(word,2)))
      end
+
--      then hash[word] = id; table.insert(idx,word);
     end
+
--     end
   end
+
--   end
  table.sort(idx);
+
-- 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>'

}}

Personal tools
Namespaces

Variants
Actions
Navigation
metabolites
Toolbox