处理行数据的属性
?
# to change this template, choose tools | templates# and open the template in the editor.#require 'dbi'reg = [/^([a-z]|[a-z]|\_)+$/,/^([a-z]|[a-z]|\_)+$/,/^(int|varchar|char|float)$/,/^([0-9]|\()/,/\w/]default =['未知列名名','null','int','11','默认为null']file = file.new("test.txt",'w')$stdout = filedef test str array = [] j = 0 str = str.split #puts str for i in (0..4) if i == 0 unless reg[i] =~ str[j] array[i] = str[j] #puts str #puts "______________" #i += 1 j += 1 next end end if reg[i] =~ str[j] and i > 0 array[i] = str[j] #i += 1 j += 1 #next else array[i] = default[i] end end arrayendputs "hello" if /^[a-z]+$/ =~ "gisodo"array = test " int "puts array$stdout = stdoutfile.closeputs "ihgosg" if /^([a-z]|a-z|\_)+$/ =~ "gsi"?f ?/^([a-z]|a-z|\_)+$/ =~ "gsi"