Regex string on multiline help please

Hi All, hope everyone is doing well :grinning:

Looking to extract with regex ;

“Amazon Inc,
Cheshire,
Manchester,
United Kingdom.”

By using the time “05:34” as the lookahead and the “Delivery Note No” as the look back perhaps ?
As the time is always above the start of the address line, plus the Delivery Note No is always below the last line of the address.

Many thanks guys

                                  ACME TRADING COMPANY                                      (ISO 9002) 

                                  
                                  TEL No: 123456789 FAX: 123456789 
                                  (Service Tax ID: ABCDEFG 1234456) 

    DELIVERY NOTE 

    Delivery To                                            Document Information 

                                                                   Date/Time Printed                29/09/2020/**05:34** 
    Amazon Inc,
    Cheshire,                                               Issued By                        An Other
    Manchester,                                          WIP No                           123456 
    United Kingdom. 
                                                                   **Delivery Note No**                 ABCD123456 

    123456                                                  Customer Name                    Amazon Inc 

    Contact No      987654321                   Customer Acct No/Terms           M0000126/ Credit 

                                                                   Customer Order No                CASH00309A

maybe this optimistic pattern will serve:

1 Like

Haaaaaaaaaaaaaaaa
Would never have thought of using the . , as look aheads.

Thank you very much !!! :blush:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.