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 7683011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:41:57+00:00 2026-05-31T18:41:57+00:00

An example signature may be: On Tue, Mar 20, 2012 at 2:38 PM, Johnny

  • 0

An example signature may be:

On Tue, Mar 20, 2012 at 2:38 PM, Johnny Walker <johnny.talker@gmail.com> wrote:

And then follows the quoted reply. I do have a discrete sensation this is locale specific though which makes me a sad programmer.

The reason I ask for this is because roundup doesn’t strip these correctly when replying through gmail to an issue. And I think origmsg_re is the config.ini variable I need to set alongside keep_quoted_text = no to fix this.

Right now it’s the default origmsg_re = ^[>|\s]*-----\s?Original Message\s?-----$

Edit: Now I’m using origmsg_re =
^On[^<]+<.+@.+>[ \n]wrote:[\n]
which works with some gmail clients that break lines that are too long.

  • 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-05-31T18:41:59+00:00Added an answer on May 31, 2026 at 6:41 pm

    The following regex will match gmails prefix in a pretty safe manner. It ensures that there are 3 commas and the liter text On … wrote

    On([^,]+,){3}.*?wrote:
    

    If the regex should match in a case insensitve way then don’t forget to add the modifier.

    if re.search("On([^,]+,){3}.*?wrote:", subject, re.IGNORECASE):
        # Successful match
    else:
        # Match attempt failed
    

    Kind Regards, Buckley

    Match the characters “On” literally «On»
    Match the regular expression below and capture its match into backreference number 1 «([^,]+,){3}»
       Exactly 3 times «{3}»
       Note: You repeated the capturing group itself.  The group will capture only the last iteration.  Put a capturing group around the repeated group to capture all iterations. «{3}»
       Match any character that is NOT a “,” «[^,]+»
          Between one and unlimited times, as many times as possible, giving back as needed (greedy) «+»
       Match the character “,” literally «,»
    Match any single character that is not a line break character «.*?»
       Between zero and unlimited times, as few times as possible, expanding as needed (lazy) «*?»
    Match the characters “wrote:” literally «wrote:»
    
    Created with RegexBuddy
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given a function object, how can I get its signature? For example, for: def
Example: copy in one tmux pane (via vim), then switch to another pane (running
Example CSS #wrap{margin:20px} Code prettify wraps the whole line in .com <span class=com>#wrap{margin:20px}</span> Somebody
The example below may not be problematic as is, but it should be enough
I'm struggling with the F# type signature notation. For example let's say you have
Example C API signature: void Func(unsigned char* bytes); In C, when I want to
For example let's say I'm writing a method with the below signature (C#4 so
How do I get the signature of built in methods? Example: dict().get(k) >> a
Example Div: <div class=container> <div class=select1></div> <div class=select2></div> <div class=select3></div> </div> Now I want
Example: print max(chain_length(i) for i in xrange(1,10001)) This returns the maximum/biggest chain_length (an arbitrary

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.