Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7922321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:54:38+00:00 2026-06-03T16:54:38+00:00

I am hoping someone can help me with this regex. I’ve only used it

  • 0

I am hoping someone can help me with this regex. I’ve only used it to collect single words in a string, so I’m not sure how to handle multiple lines and what look like ASCII characters.

Here is the text block:

Information       - RETAILEAITRT00003 - Traitement        - Processing        - --->  Recovery from 05/09/2012 at 09:17:50 AM 

Information       - RETAILEAITRT00020 - Traitement        - Processing        - --->  Information recovery starts on 05/09/2012 at 09:17:50 AM 

Information       - RETAILEAITRT00021 - Traitement        - Processing        - ---->  File processing: C:\Program Files (x86)\Prog\Prog RIT\Web Orders\live\Prog Import\Order_110039354.tab
Information       - RETAILEAITRT00005 - Traitement        - Processing        - --->  End of information recovery on 05/09/2012 at 09:17:51 AM 
Information       - RETAILEAITRT00006 - Traitement        - Processing        -    -> 6 records read 
Information       - RETAILEAITRT00008 - Traitement        - Processing        -    -> 6 records processed 
Information       - RETAILEAITRT00010 - Traitement        - Processing        -    -> 6 integrated records 
Information       - RETAILEAITRT00015 - Traitement        - Processing        -    ->  No integration errors 

Information       - RETAILEAITRT00020 - Traitement        - Processing        - --->  Information recovery starts on 05/09/2012 at 09:17:51 AM 

Information       - RETAILEAITRT00021 - Traitement        - Processing        - ---->  File processing: C:\Program Files (x86)\Prog\Prog RIT\Web Orders\live\Prog Import\Order_110039355.tab
Third-party       -  : La raison sociale doit �tre renseign�e 
Third-party       - _SHIP : La raison sociale doit �tre renseign�e 
Erreur            - RETAILEAIDOC00008 - Document          - Document          - address The internal reference enables the recovery of a document. It is mandatory 
Erreur            - RETAILEAIDOC00008 - Document          - Document          - address The internal reference enables the recovery of a document. It is mandatory 
Information       - RETAILEAITRT00005 - Traitement        - Processing        - --->  End of information recovery on 05/09/2012 at 09:17:52 AM 
Information       - RETAILEAITRT00006 - Traitement        - Processing        -    -> 4 records read 
Information       - RETAILEAITRT00008 - Traitement        - Processing        -    -> 4 records processed 
Information       - RETAILEAITRT00012 - Traitement        - Processing        -    ->  No records integrated 
Information       - RETAILEAITRT00013 - Traitement        - Processing        -    -> 4 records contain errors 

Information       - RETAILEAITRT00003 - Traitement        - Processing        - --->  Recovery from 05/09/2012 at 09:33:03 AM 

Information       - RETAILEAITRT00020 - Traitement        - Processing        - --->  Information recovery starts on 05/09/2012 at 09:33:03 AM 

Information       - RETAILEAITRT00021 - Traitement        - Processing        - ---->  File processing: C:\Program Files (x86)\Prog\Prog RIT\Web Orders\live\Prog Import\Order_110039356.tab
Information       - RETAILEAITRT00005 - Traitement        - Processing        - --->  End of information recovery on 05/09/2012 at 09:33:05 AM 
Information       - RETAILEAITRT00006 - Traitement        - Processing        -    -> 6 records read 
Information       - RETAILEAITRT00008 - Traitement        - Processing        -    -> 6 records processed 
Information       - RETAILEAITRT00010 - Traitement        - Processing        -    -> 6 integrated records 
Information       - RETAILEAITRT00015 - Traitement        - Processing        -    ->  No integration errors 

Information       - RETAILEAITRT00020 - Traitement        - Processing        - --->  Information recovery starts on 05/09/2012 at 09:33:05 AM 

Information       - RETAILEAITRT00021 - Traitement        - Processing        - ---->  File processing: C:\Program Files (x86)\Prog\Prog RIT\Web Orders\live\Prog Import\Order_110039357.tab
Information       - RETAILEAITRT00005 - Traitement        - Processing        - --->  End of information recovery on 05/09/2012 at 09:33:06 AM 
Information       - RETAILEAITRT00006 - Traitement        - Processing        -    -> 6 records read 
Information       - RETAILEAITRT00008 - Traitement        - Processing        -    -> 6 records processed 
Information       - RETAILEAITRT00010 - Traitement        - Processing        -    -> 6 integrated records 
Information       - RETAILEAITRT00015 - Traitement        - Processing        -    ->  No integration errors

However, I only want this segment:

Information       - RETAILEAITRT00020 - Traitement        - Processing        - --->  Information recovery starts on 05/09/2012 at 09:17:51 AM 

Information       - RETAILEAITRT00021 - Traitement        - Processing        - ---->  File processing: C:\Program Files (x86)\Prog\Prog RIT\Web Orders\live\Prog Import\Order_110039355.tab
Third-party       -  : La raison sociale doit �tre renseign�e 
Third-party       - _SHIP : La raison sociale doit �tre renseign�e 
Erreur            - RETAILEAIDOC00008 - Document          - Document          - address The internal reference enables the recovery of a document. It is mandatory 
Erreur            - RETAILEAIDOC00008 - Document          - Document          - address The internal reference enables the recovery of a document. It is mandatory 
Information       - RETAILEAITRT00005 - Traitement        - Processing        - --->  End of information recovery on 05/09/2012 at 09:17:52 AM 
Information       - RETAILEAITRT00006 - Traitement        - Processing        -    -> 4 records read 
Information       - RETAILEAITRT00008 - Traitement        - Processing        -    -> 4 records processed 
Information       - RETAILEAITRT00012 - Traitement        - Processing        -    ->  No records integrated 
Information       - RETAILEAITRT00013 - Traitement        - Processing        -    -> 4 records contain errors 

There are also some special characters there that appear as weird question marks. I just don’t really know where to start with it really.. I guess it will have to look for ^Erreur, then grab the lines above and below it until it finds ^ with white space…?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:54:40+00:00Added an answer on June 3, 2026 at 4:54 pm

    I was able to get this to work with the following regular expression:

    Information.+recovery starts.+\n\n(?:.+\n)+(?:Erreur.+\n)+(?:.+\n)+
    

    Note: this requires the use of the “g” (global) flag (tested successfuly in JavaScript). Not sure which language you’re using, but it should have an equivalent flag.

    And yes, it’s extremely ugly :). Here’s basically what it’s looking for:

    • A line that starts with “Information” and includes the words “recovery starts”
    • Followed by an empty line
    • Followed by at least one generic line
    • Followed by at least one line that starts with “Erreur”
    • Followed by any consecutive, non-whitespace-only lines
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am hoping that someone can help me with this regex, I need to
I am hoping that someone can help me. I am not exactly sure how
Really hoping someone can help with this. I'm sure there are better ways to
I'm hoping someone can help on this one, I have created a custom object
Hoping that someone can help clear up this very annoying situation I find myself
I'm hoping someone can help me as I've been stuck on this problem for
This problem is very strange and I'm hoping someone can help me. For the
Can someone help me clean up this nested regex (re.sub) in python, please? I
I'm hoping someone can help with this, as it's driving me absolutely nuts. I
I'm hoping someone can help me with this as I'm at a loss. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.