(Original) Detection Strings contains numbers

xiaoxiao2021-03-06  110

'/ * =============================================== = '/ * Function: Judgment string contains digital' / * function parameters: str = string '/ * return value: true = contain digital false = not included with digital' / * Description: Use Regular expression "/ d" to test whether there is no number '/ * ================================== ============== Function HASNUMBER (STR) DIM REG, MATCHESSET reg = new regexpreg.ignorecase = truereg.global = trueg.pattern = "/ d" set matches = reg.execute (STR ) If matches.count> 0 Then Hasnumber = trueElse HASNumber = false = nothingset reg = Nothingend Function

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

New Post(0)