#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?i)(Port of Registry\s*:\s*[a-z]{1,}\s*)"
Local $sString = "ATTN : SNP TEAM" & @CRLF & _
" " & @CRLF & _
"Kindly be noted that recent deal was just failed due to late sub lifting by the sellers. Therefore still we can" & @CRLF & _
"develop for sale the following panamax bulk carrier from very close bank:-" & @CRLF & _
"(sellers are ‘Shinhan Capital’ and I have done many deals with them since last 10 years.)" & @CRLF & _
" " & @CRLF & _
"M/V DAEBO TRADER" & @CRLF & _
"==============" & @CRLF & _
"Type : Bulk Carrier" & @CRLF & _
"IMO NO. : 9230153" & @CRLF & _
"Flag : KOREA" & @CRLF & _
"Port of Registry : JEJU" & @CRLF & _
"Class : KR" & @CRLF & _
"Built : 2002 / Namura Shipbuilding, Japan" & @CRLF & _
"DWT : 73,870 mt on 13.962 m Draft" & @CRLF & _
"GRT / NRT : 39,056 / 25,246" & @CRLF & _
"LOA : 224.89 m" & @CRLF & _
"LBP : 215.00 m" & @CRLF & _
"Draught : 13.95 m" & @CRLF & _
"Beam : 32.20 m" & @CRLF & _
"M/E : MAN B&W 7S50MC-C8.1" & @CRLF & _
"Grain Capacity : 89,000 cu.m" & @CRLF & _
"Side-rolling hatches, Hydraulically operated, 7HO/7HA" & @CRLF & _
" " & @CRLF & _
"(All details are given in good faith but without guarantee.)" & @CRLF & _
" " & @CRLF & _
"She is laid up in Yeosu/Korea." & @CRLF & _
"Holding fuller details and it is at your disposal." & @CRLF & _
"Inviting best offers." & @CRLF & _
" " & @CRLF & _
"Thanks & Best Regards" & @CRLF & _
"Danny, Park" & @CRLF & _
"설명: 설명: 설명: 훼어브릿지로고(영문)가로" & @CRLF & _
"FAIRBRIDGE GLOBAL INC." & @CRLF & _
"Tel : +82 2 553 5190" & @CRLF & _
"Dir : +82 2 722 5191" & @CRLF & _
"Mob: +82 10 5299 1126" & @CRLF & _
"MSN: dannypark78@hotmail.com" & @CRLF & _
"Mail: snp@fairbridge.co.kr"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm