|
FunctionTQ(rngAsRange,OptionaliAsString="数字")WithCreateObject("vbscript.regexp")SelectCaseiCase"数字":.Pattern="\d"Case"字母":.Pattern="[a-zA-Z]"Case"汉字":.Pattern="[\u4e00-\u9fa5]"EndSelect.Global=TrueSetmatches=.Execute(rng.Value)ForEachMatchInmatchesa=a&s&MatchNextTQ=IIf(Len(a)>0,a,"")EndWithEndFunction
|
|