近日在和朋友讨论 MaskMatch 时偶得2个不错的算法。
函数1 只支持'*','?'模糊匹配。速度比采用递归算法的快近2倍,比TMask方法快很多。
函数2 完全支持正规表达式。速度于之前的相同。(不会正规表达式的朋友慎用)
// ===========================
// Funtion 1
// ===========================
// Check if the string can match the wildcard. It can be used for unicode strings as well!
// C: 2004-07-24 | M: 2004-07-24
function MaskMatch(co...[ 查看全文 ]