復合條件: 例如:(小小明 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