#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?sm)(<ptS[a-zA-Z]*Text[a-zA-Z0-9\/=\+\n\t\r\0 "]+>)([a-zA-Z0-9\/=+\n\t\r\0 &#;\-\.\(\),:£]+)(<\/ptS[a-zA-Z]*Text[a-zA-Z0-9\/=\+\n\t\r\0 "]*>)"
Local $sString = "<CDBText id="(0:0-51181)">" & @CRLF & _
" <dwRefTextOrdner>5622</dwRefTextOrdner>" & @CRLF & _
" <dwRefMitarbeiter>0</dwRefMitarbeiter>" & @CRLF & _
" <ptSName code="None" lang="en">OWN_Text 15</ptSName>" & @CRLF & _
" <dBreite>21</dBreite>" & @CRLF & _
" <dHoehe>29.699999999999999</dHoehe>" & @CRLF & _
" <dOben>2</dOben>" & @CRLF & _
" <dUnten>2</dUnten>" & @CRLF & _
" <dLinks>2</dLinks>" & @CRLF & _
" <dRechts>2</dRechts>" & @CRLF & _
" <cHochQuerformat>0x00</cHochQuerformat>" & @CRLF & _
" <cPapierSchacht>0</cPapierSchacht>" & @CRLF & _
" <cPapierSchachtErsteSeite>0</cPapierSchachtErsteSeite>" & @CRLF & _
" <ptSDruckername code="None" lang="en"></ptSDruckername>" & @CRLF & _
" <ptDErstellungsdatum>Thu 04.Sep 2008</ptDErstellungsdatum>" & @CRLF & _
" <ptDSpeicherungsdatum>Thu 04.Sep 2008</ptDSpeicherungsdatum>" & @CRLF & _
" <ptTSpeicherungszeit>10:10:10 am</ptTSpeicherungszeit>" & @CRLF & _
" <nVersion>3</nVersion>" & @CRLF & _
" <ptSTitel code="None" lang="en"></ptSTitel>" & @CRLF & _
" <ptSThema code="None" lang="en"></ptSThema>" & @CRLF & _
" <ptSAutor code="None" lang="en">ld</ptSAutor>" & @CRLF & _
" <ptSKommentar code="None" lang="en"></ptSKommentar>" & @CRLF & _
" <cGeschuetzt>0x00</cGeschuetzt>" & @CRLF & _
" <cDBTextDaten><xref refid="(0:0-51182)"/></cDBTextDaten>" & @CRLF & _
" </CDBText>" & @CRLF & _
"" & @CRLF & _
" <CDBTextDaten id="(0:0-51182)">" & @CRLF & _
" <ptBKopfzeileText len="0" crc="0">" & @CRLF & _
"" & @CRLF & _
" </ptBKopfzeileText>" & @CRLF & _
" <ptSKopfzeileText code="None" lang="en"></ptSKopfzeileText>" & @CRLF & _
" <ptBKopfzeileFormat len="0" crc="0">" & @CRLF & _
"" & @CRLF & _
" </ptBKopfzeileFormat>" & @CRLF & _
" <ptBFusszeileText len="0" crc="0">" & @CRLF & _
"" & @CRLF & _
" </ptBFusszeileText>" & @CRLF & _
" <ptSFusszeileText code="None" lang="en"></ptSFusszeileText>" & @CRLF & _
" <ptBFusszeileFormat len="0" crc="0">" & @CRLF & _
"" & @CRLF & _
" </ptBFusszeileFormat>" & @CRLF & _
" <ptBMitteText len="1031" crc="3139242066">" & @CRLF & _
"8PHw/1BLAwQUAAAACABFUSQ5KkncyMoCAADTBAAAKwBwAERPQ1VNRX4xL0NBVENM" & @CRLF & _
"SX4xL0xPQ0FMU34xL1RlbXAvMi9ibG8zMC50bXBTRFsApAAAAAAIALXyphxjZGBp" & @CRLF & _
"EGFgYDBggAAfIGZkBTNZRYFE/LvcS4ufyjZ5Wa+KSmHBLcfIxMDAxBDBwAyWlmD4" & @CRLF & _
"zyjPABIDqVUAEgpgtghEnBEiLgSmVCBieOwEAFVUDQAH8qW/SPKlv0jypb9IbVPd" & @CRLF & _
"TtswFO7dtEp9h3MJoi0dGruAq6pkUIlS1HYgLt3kJDF17M52ChGPw4vus1MG+6kU" & @CRLF & _
"p3KOfb6/M5nfLJObFX2fL2bU6xKeT/j9uYZ3r3vP5Lw1ulANWU5NVbHOyJfCk1CK" & @CRLF & _
"tuwdCctUbwfeDDLhmZ6kL2kn0lRq4aXRjtacG9SIrJLOYWfY694qFg5bbkMyp8bU" & @CRLF & _
"7S3a1Xg9lexLtmHbUmYKMpZSdJSO8loBydYaz6nnDDcB/CK5Tu7GIDRLLqaT8TVd" & @CRLF & _
"TZer+eKByDFH2DZzRAeFcQDiy8PADuduF/NJcvFjkdAla7ZCkdCCHXp7mfbJpUIB" & @CRLF & _
"IvhujZKupCPiZ29FGliRyYnW1mxYkzfGl306Oh6guiETwb+Xutis1fPt6XWnVMgd" & @CRLF & _
"UwU2bPfCEOBBXDRdG3wDzZSzoEgAUeuMrfPio/6uTsv3MgeVrG1IkKvCV1YMu3yA" & @CRLF & _
"aqXbDEPTv2+ZWJN7ugs+1jAkNF9DAjJbaSSYC6kpNRoZgDo7IZVY70XBrgu3exNP" & @CRLF & _
"hdNo5Eu45ETe1nCew6fAs6wroSmzdUG4MbL2w2ErSyvIPf83YcgQurgWeGGkLqgS" & @CRLF & _
"j9AJUSnYNn1it+VUihAMo1AUU9kvBboKWitjcF2g9Fhj+ZBFLRFt8WamoOLfEAxb" & @CRLF & _
"pzJDx2HRxgPjz1qGG6A7DwzME5Fg28illrn1seVIy2iF0BJvRwd7PpRLxYdnN6Li" & @CRLF & _
"8y+jb6ej/To6/3qOuHzudceXiySZhTFdzel2/NDrJsvVdDZeJWdEryejEQ3o5OQ0" & @CRLF & _
"AoyjEYYlBDVtgiUIxU5mTKlq5YtTCQcwl7UNY5pjNEATsDyD5pV54h3bfvQSfxrC" & @CRLF & _
"9IbohZzv2LPFOGO34kxislt79xbAkA3CJwGj2hokOUQkYgjFHklxQMDPGAfVxBSK" & @CRLF & _
"AjLFEtFEm4EGDELUlOLfA7aPSZuRfUyWstCcnb3lptN56Ww6L78AUEsBAhcLFAAA" & @CRLF & _
"AAgARVEkOSpJ3MjKAgAA0wQAACsAEQAAAAAAAAAgALaBAAAAAERPQ1VNRX4xL0NB" & @CRLF & _
"VENMSX4xL0xPQ0FMU34xL1RlbXAvMi9ibG8zMC50bXBTRAQApAAAAFVUBQAH8qW/" & @CRLF & _
"SFBLBQYAAAAAAQABAGoAAACDAwAAAAA=" & @CRLF & _
" </ptBMitteText>" & @CRLF & _
" <ptSMitteText code="None" lang="en">CONSENT FORM " & @CRLF & _
" " & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"We strongly recommend that all pets are up-to-date with vaccinations before admission." & @CRLF & _
"Please ask if you are unsure whether your dog or cat is fully protected." & @CRLF & _
" " & @CRLF & _
"RELEVANT MEDICAL HISTORY see records (gosforth)" & @CRLF & _
"" & @CRLF & _
" " & @CRLF & _
"PROCEDURE General anaesthetic, scale and polish + extraction of broken tooth, +/- any other extractions" & @CRLF & _
" " & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"I give my permission for the above procedure and understand that all such procedures carry a small element of risk." & @CRLF & _
"I understand that Croft Vets use the best opioid pain control available and consent to the use of this safe and effective human drug in my pet.." & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"We recommend that all patients undergoing major surgery, especially older pets,have a blood test just before administration of a general anaesthetic." & @CRLF & _
"" & @CRLF & _
"I do / do not require a pre-operative blood screen for my pet Small animals (patient file):Name;10650;10650;0;4;" & @CRLF & _
" " & @CRLF & _
"AGREEMENT TO PAY" & @CRLF & _
"ESTIMATE: £200 - 225" & @CRLF & _
"" & @CRLF & _
"It is our policy to provide clients with an accurate fee estimate." & @CRLF & _
"However, the very nature of veterinary medicine and surgery makes it impossible to predict costs exactly." & @CRLF & _
"I agree to pay all fees on collection of my pet." & @CRLF & _
"" & @CRLF & _
"" & @CRLF & _
"Signed:" & @CRLF & _
"" & @CRLF & _
"</ptSMitteText>" & @CRLF & _
" <ptBMitteFormat len="3251" crc="1808381608">" & @CRLF & _
"8PHw/1BLAwQUAAAACABFUSQ5oClCBnYLAADi2AAAKwBwAERPQ1VNRX4xL0NBVENM" & @CRLF & _
"SX4xL0xPQ0FMU34xL1RlbXAvMi9ibG8zMi50bXBTRFsApAAAAAAIALXyphxjZGBp" & @CRLF & _
"EGFgYDBggAAfIGZkBT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vn37YOfOnbBp0yZYu3YtLMOjmDc7qgwK8GY0" & @CRLF & _
"ISrNLNhePmYx1F0I5VPm6x2HJVjvj23C3FnT2G/kPSnfW572scoKCu2eqi1DuVu7" & @CRLF & _
"XWLPbtHj8u2AHxVhyiQ7B2I1e8rYe6/oXtFUafcgsZfYS+wl9hJ758/eMqVfVT/p" & @CRLF & _
"amV4lVKv+p2GbmjGZhSa/ecFly49PYNmy7g2IjPbgvIOB4aGxMBIEB9D4roTgXBQ" & @CRLF & _
"GgmLLwaHpPU73IFhyemwN2+1R+/tziYnvJOCVIdqiFREKiIVkYpIZYZUahwUI1V5" & @CRLF & _
"vQAbvqnFRn1CI8xiHn09HkMXnb91du3dt7/b3YNcitJMH1ulp9mN4jxEVCUov6tr" & @CRLF & _
"T2eaYKqAgilCFCGKEAWEKDOIsir9SgumrDkKpiCKny5danr8/LKUcyMysWaYI5jy" & @CRLF & _
"S8Gjg2FdOOVIE099UEWwIlgRrAhWBCt+8VQVxlNDCfHUViWeWrvkgrA5LpVnPLUf" & @CRLF & _
"AtCHn4jPfNndKBT3maplkc2XVaG8Hld7l8vb0NbrcnXsgC3N2+0zCjvZ9YxmzYid" & @CRLF & _
"xE5iJ7GTJzttSr/SJqdsTwI91arjnsfemTF00IVgj6LU7NalL8B5OfY/PG0o6T0h" & @CRLF & _
"9QelkC6WbHY2pC3VNiZJA7oyLU44dnxo+FoKjNKUHmGUMEoYJYyaw6jS26MY7YQK" & @CRLF & _
"DEHPJQlBVdPSEwPXSiy19FvxpbYopVrW7+gIhCVno6MJL+h4qg0deyFaiaDiuEeX" & @CRLF & _
"vgAnFhkQva7v0ayi2jyiJFGSGVGSKMmXkoVKv9JCysIczyp+V5e6AGcV51yi6ZXG" & @CRLF & _
"9VOKjTSlqDaPSEWkYkakIlLlckqxGiOzL+uMSzTPQRNUW2YLNwNT3wTPKcX3hM1Q" & @CRLF & _
"cn2yhM+UYks0GvOaqmWRTSkyMLbucdFX79TmES2JlsyIlkTLxRnXea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RLF & _
"rkuOwyrMuzchPI0PZePzAqzGfD9NyLtNzavr808zlL3WvgtaPn2lhE8ou7KAcf+L" & @CRLF & _
"Z/+vQlnmVLX3uH2t7T7RfaC7zdWbZv06RbJEbCI2EZuIbY7Y6qokLZItz2kk+07F" & @CRLF & _
"Iohk2THtju0OsbHF0dTctFUcHRPt27Y3OhyN7BdyUiKJgkhCEiGJkERIMoek1Uq/" & @CRLF & _
"0pC0+skzvkjK3YLcELcF6iG8QidukzyVdJF8tiZipL7BUDdAi7JvpDGdmceQXs7t" & @CRLF & _
"c5YnOSavusFQN589Pi8qQfrsqnwF6VMFkPTvlFNjIzze4NERaQCmU/hBjUXkB5Ef" & @CRLF & _
"RH4Q+UHkB5nxg9QwXPODinVfWNpZUldQCufg19/muUuaZncVvv3dwLdECgm61/8q" & @CRLF & _
"zQOVEu2R0vDhb2Q31vDHsjw0nHGzI9235Gdp+1GCKcGUYAoEU/NbZtfE9+Ho1T4X" & @CRLF & _
"49zPZ8meh0vywJ56lGcsOBIOjhxVtmoR19kdDfjPsX277jcQU22O/Xo50YnoRHQi" & @CRLF & _
"OhGd+G2O/Sd8PfNk3VQZ9AnPKeub9FOMXMO+79SC9Rl2TH7D4vph159wGbr2WAH2" & @CRLF & _
"YuC0TJc+aGXsNaYz22xIr+Y2vFyd5Jj8hq71db/Ape4pPFcrk+wJ8541fr/buPyF" & @CRLF & _
"KfIXptpfbk29AL+oNb4X29jdwqWfXUt5fCFJOs/pigK8xVvNPD/PSUNKzVPdq6eN" & @CRLF & _
"2zlpM/TVY9zqPmao2z7v860/43bD+bZymR56o0hZw1mXvH9mavOfHjpcmoc1nGw7" & @CRLF & _
"zG6Xr7Ong30b0dN6qNvl9qVexVlKP59K8QPFDxQ/AMUPZuIHlbPaVFFljlZxRhSm" & @CRLF & _
"PVyd3ejWnsI8kCjRLigNf9fwhYrkDY7NaT0uyNOvqLYHQoMpobmsmKBJ0CRoEjQJ" & @CRLF & _
"movhV1RvK+ypX5nIHkHHGv3jI8g7NB8oDT+Zgvb6hR+xxxWWvDccilnDX83QTYl9" & @CRLF & _
"kC/z4aaw38o9GAwFGlr7+6VQKOWiyqtWgj5Bn6BP0Cfom4G+OiMV26GA/epA4uiv" & @CRLF & _
"hozcLKpU14ecWJWdM/AQ8s5UXtMbkGy4fV51G2u3Gurm802PI4o/Ub8mX0P5/86H" & @CRLF & _
"Z8IOyNYApR69/wP5JOSTkE9CPgmQT8JrA2Clq+VoIGJcwdgeA8bSw+fO8jzAh8Pa" & @CRLF & _
"1H+sIjoRnYhORCeiE9+1qbE9/RilYmtTNVOf84yeY/ub44VLIdi6Ob6SqH/cVpSn" & @CRLF & _
"gd32Qan/uDQg9k2kDqJaSghThCnCFGGKMMVrYJdZaU43sqvO8lvxTWWLdAA3menX" & @CRLF & _
"vv8PUEsBAhcLFAAAAAgARVEkOaApQgZ2CwAA4tgAACsAEQAAAAAAAAAgALaBAAAA" & @CRLF & _
"AERPQ1VNRX4xL0NBVENMSX4xL0xPQ0FMU34xL1RlbXAvMi9ibG8zMi50bXBTRAQA" & @CRLF & _
"pAAAAFVUBQAH8qW/SFBLBQYAAAAAAQABAGoAAAAvDAAAAAA=" & @CRLF & _
" </ptBMitteFormat>" & @CRLF & _
" </CDBTextDaten>" & @CRLF & _
""
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