[Original] VB Gets the length of the Chinese and English string mix

xiaoxiao2021-03-06  41

'Original: Get the process of the middle and English string mixing length, the Chinese word is 2.

'Need to reference Microsoft VBScript Regular Expressions 5.5 or Microsoft VBScript Regular Expressions 1.0

Function Regexptest (BLSTR)

Set re = new regexp

Re.ignorecase = true

Re.global = TRUE

Re.pattern = "[/ x00- / xff]"

Restr = re.replace (BLSTR, "")

Restr = LEN (BLSTR) LEN (RESTR)

Regexptest = Restr

END FUNCTION

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

New Post(0)