实现支持逻辑搜索/单词搜索/词组搜索+支持OR/A(5)



    Private Function check()
        Dim re
        Dim re1
        Dim re2
        Dim re3
        Dim str
        Dim str1
        Dim a1
        Dim a2
        Dim a3
        Dim a4
        str  = strField & " like '%"
        str1 = "%'"
        With objReg
            .Pattern = "^\(.+\)\s(and|or)\s"
            re       = .Test( strText )
            .Pattern = "\s(and|or)\s\(.+\)$"
            re3      = .Test( strText )
        End With
        If re And re3 Then
            If CheckYes( "^\((\S*\S) (\bor\b|\band\b) (\S*\S)\) (and|or) \((\S*\S) (\bor\b|\band\b) (\S*\S)\)$" , 6 ) Then
                check = False
            Else
                With objNode2
                    a1    = .submatches(0)
                    a2    = .submatches(2)
                    a3    = .submatches(4)
                    a4    = .submatches(6)
                    check = "(" & str & a1 & str1 & " " & .submatches(1) & " " & str & a2 & str1 & ") " &_

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3626.html