这意思?$Str = _
'No. ID Info' & @CRLF & _
' 1 101 ASK' & @CRLF & _
'' & @CRLF & _
' Type: A' & @CRLF & _
' Length: 20' & @CRLF & _
' Peer ID : 202' & @CRLF & _
'' & @CRLF & _
'No. ID Info' & @CRLF & _
' 1 102 ANSWER' & @CRLF & _
'' & @CRLF & _
' Type: B' & @CRLF & _
' Length: 60' & @CRLF & _
' Peer ID : 205' & @CRLF
Msgbox(0, test($str), $str)
$Str = _
'No. ID Info' & @CRLF & _
' 1 101 ASK' & @CRLF & _
'' & @CRLF & _
' Type: A' & @CRLF & _
' Length: 20' & @CRLF & _
' Peer ID : 202' & @CRLF & _
'' & @CRLF & _
'No. ID Info' & @CRLF & _
' 1 102 ANSWER' & @CRLF & _
'' & @CRLF & _
' Type: B' & @CRLF & _
' Length: 60' & @CRLF & _
' Peer ID : 205' & @CRLF & _
'' & @CRLF & _
'No. ID Info' & @CRLF & _
' 1 101 ASK' & @CRLF & _
'' & @CRLF & _
' Type: A' & @CRLF & _
' Length: 20' & @CRLF & _
' Peer ID : 207'
Msgbox(0, test($str), $str)
Func test($str)
If StringRegExp($str, 'ASK(?:\r?\n.*){4}ID : 207') Then Return TRUE
Return FALSE
Endfunc
|