functiontrim(s)return(string.gsub(s,"^%s*(.-)%s*$","%1"));enda="8.1"print(a);--正则方法:_,_,d=string.find(trim(a),"(.+)");print(d);--截取方法:b=string.find(a,">",1,false);c=string.find(a,"</",1,false);print(string.sub(a,b+1,c-1));--替换方法:a=string.gsub(trim(a),"","")a=string.gsub(trim(a),"","")print(a);