Formatting in Chinese and English mixed strings

xiaoxiao2021-03-06  20

Function GetString (Str, Num) Dim objRegExp, Matches, Letter, strTemp, iTemp IF Len (Str)> Num Then strTemp = Left (Str, Num) Set objRegExp = New RegExp objRegExp.Global = true objRegExp.Pattern = "[/ U0020- / u007e] "SET MATCHES = ObjRegexp.execute (strTemp) letter = matches.count itemp = Num letter straTemp = left (str, itemp) if len (str, it getstring = strtemp &" .. . "Else getString = strTemp end if set matches = Nothing set objregexp = Nothing else getstring = str over ifend function

2005-3-23 20:41 scales

转载请注明原文地址:https://www.9cbs.com/read-43478.html

New Post(0)