str = " uses
  Windows, Messages, SysUtils, Classes, Controls, Forms, Dialogs,
Graphics,
  Login_c, Login_i,
  Utility_c, Utility_i,
  Agent_i,
  MMenu,                              // ????????????????
  CtrlForm,                          // ???起?????御
  CommonData,                        // ????????????????????
  ServerAccess,                      // ???信?????????層統?????
  MasterList,                        // ???称??????管????????
  IniFileAccess,                     // ini???????管????????
  MessageAccess,                     // ????????????管????????
  LogAccess,                         // ????????御?????
  TelephoneCommand,                  // ??話??御??????????????
  TelephoneDataClass,                // ??話??御???????????
  ExtCtrls, jpeg, StdCtrls;

type "

  str.scan(/^\s*uses\s*$(.*?)\s*,\s*(\S+)\s*;\s*^type/m) do |us|
            names = $1
             names.split(/,/).each do |name| # split the words(w+) only
               sub_name = names.gsub(/\/*\s*(\S+)$/, "") # problem here
I think
               puts " =====  sub names ======= #{ sub_name}"
#             puts " >>>>>>> here uses #{ name}"
                if /(\w+)/m =~ name
                ref = $1
                  var = $1
#                   puts "@@@@@@@ here uses #{ var}"
                  if class_name
#                  puts " class name : #{class_name} reference class
name #{var} "
                  end
              end
            end
          end

please help me abut this problem. I want to exclude or split the
comments.( japanese comment parts). I tried  many combinations but still
problem.
-- 
Posted via http://www.ruby-forum.com/.