Tag処理 †Tag処理は複雑でまとめるのが大変なので、とりあえず
ここでは2種類の区切り文字列に挟まれた文字列を取り出すプロシージャのサンプルを紹介します。 Public Sub example1701(InTxt As String, OutTxt As String, preDem As String, _
posDem As String, Status As Boolean, nextPos As Integer)
Dim searchPos As Integer, endPos As Integer
searchPos = InStr(1, InTxt, preDem)
If searchPos > 0 Then
endPos = InStr(searchPos + Len(preDem), InTxt, posDem)
If endPos = 0 Then
Status = False
Else
Status = True
OutTxt = Trim(Mid(InTxt, searchPos + Len(preDem), endPos - searchPos - Len(preDem)))
nextPos = endPos + Len(posDem)
End If
Else
Status = False
End If
End Sub
Last-modified: 2014-03-11 (火) 01:58:42 (4327d)
|