admin 管理员组

文章数量: 1087139


2024年5月19日发(作者:solr全文检索面试)

End With

Next

End If

Set m = Nothing

Set objRegEx = Nothing

SearchSpecificCommandInfo = m0StartPos > 0

End Function

Private Function CreateSearchCommandPattern() As String

Dim p(1 To 4) As String

Dim myPattern As String

Dim i As Integer

p(1) = "ID=""{00000000-0000-0000-0000}"""

p(2) = "CMG"

p(3) = "DPB"

p(4) = "GC"

For i = 1 To 4

myPattern = myPattern & "(" & p(i) & IIf(i > 1, "=""[a-z0-9]+""", "") & ")" & vbCrLf & "[sS]*?"

Next

CreateSearchCommandPattern = myPattern & "[Host Extender Info]"

End Function

Private Function CoverData(Content As String, myCommandLinesInfo() As CommandLineInfo) As Byte()

Dim i As Long

Dim s As String

s = Content

For i = LBound(myCommandLinesInfo) To UBound(myCommandLinesInfo)

With myCommandLinesInfo(i)

Mid(s, .StartPos, Len(.Value)) = CreateFillContent(Len(.Value))

End With

Next

CoverData = StrConv(s, vbFromUnicode, LANG_ENGLISH)

End Function

Private Function CreateFillContent(ContentLen As Long) As String

CreateFillContent = Replace(Space(ContentLen 2), " ", vbCrLf) & IIf(ContentLen Mod 2, Chr(32), "")

End Function

Private Function Write2File(fName As String, DAT() As Byte) As String

If Dir(fName) <> "" Then Kill fName

Open fName For Binary As #1

Put #1, , DAT

Close

Write2File = fName

End Function


本文标签: 面试 全文检索 作者