#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m)({[^{}]*?)(ToolTipML)([^}]*})"
Local $sString = " { 66 ;3 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the language to be used on printouts for this customer.;" & @CRLF & _
" ENG=Specifies the language to be used on printouts for this customer.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Language Code";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 1000000087;3;Field ;" & @CRLF & _
" SourceExpr="Created By";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 1000000090;3;Field ;" & @CRLF & _
" SourceExpr="Creation Date";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 1000000007;3;Field ;" & @CRLF & _
" CaptionML=[ENU=Bill-To Alert;" & @CRLF & _
" ENG=Bill-To Alert];" & @CRLF & _
" ToolTipML=[ENU=Illuminates when invoices are paid by another customer (the Bill-to).;" & @CRLF & _
" ENG=Illuminates when invoices are paid by another customer (the Bill-to).];" & @CRLF & _
" SourceExpr=BillToText;" & @CRLF & _
" Editable=FALSE;" & @CRLF & _
" Style=Unfavorable;" & @CRLF & _
" StyleExpr=TRUE }" & @CRLF & _
"" & @CRLF & _
" { 1000000011;3;Field ;" & @CRLF & _
" ToolTipML=[ENU=Default Contact for the Accounts Department, selected from the Contact List.;" & @CRLF & _
" ENG=Default Contact for the Accounts Department, selected from the Contact List.];" & @CRLF & _
" SourceExpr="Accounts Contact No." }" & @CRLF & _
"" & @CRLF & _
" { 1000000010;3;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the accounts contact name for the customer.;" & @CRLF & _
" ENG=Specifies the accounts contact name for the customer.];" & @CRLF & _
" SourceExpr="Accounts Contact Name" }" & @CRLF & _
"" & @CRLF & _
" { 1000000009;3;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the customer's alternate telephone number. Synchronized with the Contact Card.;" & @CRLF & _
" ENG=Specifies the customer's alternate telephone number. Synchronized with the Contact Card.];" & @CRLF & _
" SourceExpr="Phone 2";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 1000000008;3;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the customer's alternate fax number. Synchronized with the Contact Card.;" & @CRLF & _
" ENG=Specifies the customer's alternate fax number. Synchronized with the Contact Card.];" & @CRLF & _
" SourceExpr="Fax 2";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 1905885101;1;Group ;" & @CRLF & _
" CaptionML=[ENU=Invoicing;" & @CRLF & _
" ENG=Invoicing] }" & @CRLF & _
"" & @CRLF & _
" { 34 ;2 ;Field ;" & @CRLF & _
" CaptionML=[ENU=Bill-to Customer;" & @CRLF & _
" ENG=Bill-to Customer];" & @CRLF & _
" ToolTipML=[ENU=Specifies a different customer who will be invoiced for products that you sell to the customer in the Name field on the customer card.;" & @CRLF & _
" ENG=Specifies a different customer who will be invoiced for products that you sell to the customer in the Name field on the customer card.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Bill-to Customer No.";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 1000000041;2;Field ;" & @CRLF & _
" CaptionML=[ENU=Bill-to Customer Name;" & @CRLF & _
" ENG=Bill-to Customer Name];" & @CRLF & _
" SourceExpr=BillToName;" & @CRLF & _
" Importance=Promoted;" & @CRLF & _
" Editable=FALSE }" & @CRLF & _
"" & @CRLF & _
" { 29 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the customer's VAT registration number for customers in EU countries/regions.;" & @CRLF & _
" ENG=Specifies the customer's VAT registration number for customers in EU countries/regions.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="VAT Registration No.";" & @CRLF & _
" OnDrillDown=VAR" & @CRLF & _
" VATRegistrationLogMgt@1000 : Codeunit 249;" & @CRLF & _
" BEGIN" & @CRLF & _
" VATRegistrationLogMgt.AssistEditCustomerVATReg(Rec);" & @CRLF & _
" END;" & @CRLF & _
" }" & @CRLF & _
"" & @CRLF & _
" { 61 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the customer in connection with electronic document sending.;" & @CRLF & _
" ENG=Specifies the customer in connection with electronic document sending.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr=GLN;" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 156 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies which customer address is inserted on sales quotes that you create for the customer.;" & @CRLF & _
" ENG=Specifies which customer address is inserted on sales quotes that you create for the customer.];" & @CRLF & _
" ApplicationArea=#Advanced;" & @CRLF & _
" SourceExpr="Copy Sell-to Addr. to Qte From";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 1000000095;2;Field ;" & @CRLF & _
" ToolTipML=[ENU=The INCO trading terms used by the customer.;" & @CRLF & _
" ENG=The INCO trading terms used by the customer.];" & @CRLF & _
" SourceExpr="Incoterms Code" }" & @CRLF & _
"" & @CRLF & _
" { 36 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies how many copies of an invoice for the customer will be printed at a time.;" & @CRLF & _
" ENG=Specifies how many copies of an invoice for the customer will be printed at a time.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Invoice Copies";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 170 ;2 ;Group ;" & @CRLF & _
" Name=PostingDetails;" & @CRLF & _
" CaptionML=[ENU=Posting Details;" & @CRLF & _
" ENG=Posting Details];" & @CRLF & _
" GroupType=Group }" & @CRLF & _
"" & @CRLF & _
" { 70 ;3 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the customer's trade type to link transactions made for this customer with the appropriate general ledger account according to the general posting setup.;" & @CRLF & _
" ENG=Specifies the customer's trade type to link transactions made for this customer with the appropriate general ledger account according to the general posting setup.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Gen. Bus. Posting Group";" & @CRLF & _
" Importance=Promoted;" & @CRLF & _
" ShowMandatory=TRUE }" & @CRLF & _
"" & @CRLF & _
" { 58 ;3 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the customer's VAT specification to link transactions made for this customer to.;" & @CRLF & _
" ENG=Specifies the customer's VAT specification to link transactions made for this customer to.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="VAT Bus. Posting Group";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 38 ;3 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the customer's market type to link business transactions to.;" & @CRLF & _
" ENG=Specifies the customer's market type to link business transactions to.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Customer Posting Group";" & @CRLF & _
" Importance=Promoted;" & @CRLF & _
" ShowMandatory=TRUE }" & @CRLF & _
"" & @CRLF & _
" { 68 ;2 ;Group ;" & @CRLF & _
" Name=PricesandDiscounts;" & @CRLF & _
" CaptionML=[ENU=Prices and Discounts;" & @CRLF & _
" ENG=Prices and Discounts];" & @CRLF & _
" GroupType=Group }" & @CRLF & _
"" & @CRLF & _
" { 1000000015;3;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies whether the customer is a member of a Buying Group.;" & @CRLF & _
" ENG=Specifies whether the customer is a member of a Buying Group.];" & @CRLF & _
" SourceExpr="Buying Group Code" }" & @CRLF & _
"" & @CRLF & _
" { 40 ;3 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the customer price group code, which you can use to set up special sales prices in the Sales Prices window.;" & @CRLF & _
" ENG=Specifies the customer price group code, which you can use to set up special sales prices in the Sales Prices window.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Customer Price Group";" & @CRLF & _
" Importance=Promoted }" & @CRLF & _
"" & @CRLF & _
" { 44 ;3 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies the customer discount group code, which you can use as a criterion to set up special discounts in the Sales Line Discounts window.;" & @CRLF & _
" ENG=Specifies the customer discount group code, which you can use as a criterion to set up special discounts in the Sales Line Discounts window.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Customer Disc. Group";" & @CRLF & _
" Importance=Promoted }" & @CRLF & _
"" & @CRLF & _
" { 46 ;3 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies if a sales line discount is calculated when a special sales price is offered according to setup in the Sales Prices window.;" & @CRLF & _
" ENG=Specifies if a sales line discount is calculated when a special sales price is offered according to setup in the Sales Prices window.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Allow Line Disc.";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 1000000016;3;Field ;" & @CRLF & _
" ToolTipML=[ENU=Allows Break Quantity discounts for an Assortment (or Basket) of Items. If a Total Quantity of a defined Item Discount Group is purchased then a Discount applies.;" & @CRLF & _
" ENG=Allows Break Quantity discounts for an Assortment (or Basket) of Items. If a Total Quantity of a defined Item Discount Group is purchased then a Discount applies.];" & @CRLF & _
" SourceExpr="Allow Assorted Discount" }" & @CRLF & _
"" & @CRLF & _
" { 42 ;3 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies a code for the invoice discount terms that you have defined for the customer.;" & @CRLF & _
" ENG=Specifies a code for the invoice discount terms that you have defined for the customer.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" NotBlank=Yes;" & @CRLF & _
" SourceExpr="Invoice Disc. Code";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 129 ;3 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies if the Unit Price and Line Amount fields on document lines should be shown with or without VAT.;" & @CRLF & _
" ENG=Specifies if the Unit Price and Line Amount fields on document lines should be shown with or without VAT.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Prices Including VAT";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 1901677601;1;Group ;" & @CRLF & _
" CaptionML=[ENU=Payments;" & @CRLF & _
" ENG=Payments] }" & @CRLF & _
"" & @CRLF & _
" { 160 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies a prepayment percentage that applies to all orders for this customer, regardless of the items or services on the order lines.;" & @CRLF & _
" ENG=Specifies a prepayment percentage that applies to all orders for this customer, regardless of the items or services on the order lines.];" & @CRLF & _
" ApplicationArea=#Prepayments;" & @CRLF & _
" SourceExpr="Prepayment %";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 48 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies how to apply payments to entries for this customer.;" & @CRLF & _
" ENG=Specifies how to apply payments to entries for this customer.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Application Method";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 21 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies for direct debit collections if the customer that the payment is collected from is a person or a company.;" & @CRLF & _
" ENG=Specifies for direct debit collections if the customer that the payment is collected from is a person or a company.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Partner Type";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 50 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies a code that indicates the payment terms that you require of the customer.;" & @CRLF & _
" ENG=Specifies a code that indicates the payment terms that you require of the customer.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Payment Terms Code";" & @CRLF & _
" Importance=Promoted;" & @CRLF & _
" ShowMandatory=TRUE }" & @CRLF & _
"" & @CRLF & _
" { 1000000018;2;Field ;" & @CRLF & _
" ToolTipML=[ENU=Date Formula. Overrides default Grace Period Calculation. Populated from Payment Terms.;" & @CRLF & _
" ENG=Date Formula. Overrides default Grace Period Calculation. Populated from Payment Terms.];" & @CRLF & _
" SourceExpr="Grace Period Calculation" }" & @CRLF & _
"" & @CRLF & _
" { 11 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies how the customer usually submits payment, such as bank transfer or check.;" & @CRLF & _
" ENG=Specifies how the customer usually submits payment, such as bank transfer or cheque.];" & @CRLF & _
" ApplicationArea=#Basic,#Suite;" & @CRLF & _
" SourceExpr="Payment Method Code";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 15 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies how reminders about late payments are handled for this customer.;" & @CRLF & _
" ENG=Specifies how reminders about late payments are handled for this customer.];" & @CRLF & _
" ApplicationArea=#Advanced;" & @CRLF & _
" SourceExpr="Reminder Terms Code";" & @CRLF & _
" Importance=Additional }" & @CRLF & _
"" & @CRLF & _
" { 52 ;2 ;Field ;" & @CRLF & _
" ToolTipML=[ENU=Specifies finance charges are calculated for the customer.;" & @CRLF & _
" ENG=Specifies finance charges are calculated for the customer.];" & @CRLF & _
" ApplicationArea=#Advanced;" & @CRLF & _
" SourceExpr="Fin. Charge Terms Code";"
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