复合条件: 例如:(小小明 Or 小明) And (小强 Or 小小强) 例如:(小小明 Or 小名) And 小小强 例如: ROOT1 And (广东人 Or 北京人) ----------------------------------------------------------- 复制代码 代码如下: Class CreateQueryString
Public objReg Public intStart Public strField Private objNode2 Private strText
Public Property Let QueryString( strValue ) strText = Lcase( strValue ) End Property
Private Sub Class_Initialize() Set objReg = new RegExp strField = "(标题+文章)" End Sub
Private Sub Class_Terminate() Set objReg = Nothing End Sub
Public Default Function GetText() Dim blnRes Dim strSky With objReg .IgnoreCase = true .Global = True .Pattern = "/s" blnRes = .Test( strText ) End With If (Not blnRes) Then intStart = 2 GetText = strField & " like '%" & strText & "%'" Else