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

  • SEARCH
  • Home
  • 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 7192011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:51:01+00:00 2026-05-28T19:51:01+00:00

I am trying to create a regular expression which will look for a email

  • 0

I am trying to create a regular expression which will look for a email address after Cc field in the email header. I don’t have programming control on the string, so its not specific to any particular programming language. It’s just a part of integration of some software which expects some regular expression in a search criteria

The email header looks like this:

Received: by hermit.cdu-staff.local 
    id <01CCE6E3.19910AB8@hetmit.ere-tyumm.local>; Thu, 9 Feb 2012 13:57:14 +0930
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="----_=_NextPart_001_01CCE6E3.19910AB8"
Content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft Exchange V6.5
Subject: Email header example
Date: Thu, 9 Feb 2012 13:57:10 +0930
Message-ID: <6434D994F5A495428AB3B69877565EF97040C469A@hermit.cdi-stann.local>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Email header example
Thread-Index: Aczm4xa7dGVpHUWERSSOuR8HCNmrAw==
From: "Bishnu Paudel" <Bishnu.Paudel@company.com>
To: "Study" <study@company.com>
Cc: "Cameron Loudon" <Cameron.Loudon@company.com>

I have created a regular expression which works great if the string is a one line string (the last line in the header). Here is the expression

(^|,)\s*.*Cc:.*(bishnu.paudel|cameron.loudon)@company[.]com\s*($|,).

Any help would greatly be appreciated.

  • 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-28T19:51:02+00:00Added an answer on May 28, 2026 at 7:51 pm

    The following regex should solve the problem

    \b[A-Z0-9._%+-]+@yourcompany.com\b
    

    which is an adaption of the regex presented here. Please note the comments on the original website on what a ‘valid’ e-mail address is defined as.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm no expert on Regex. I'm trying to create a regular expression that will
this one is really easy. I'm trying to create a Regular Expression that will
i trying to create a regular expression for this pattron field-122 <--the number could
I have attempted to create a function that will replace multiple regular expression values
I was trying to create a regular expression which validate !! If the text
I'm trying to create a regular expression in C# that will replace the password
I'm trying to create a regular expression that will pick the longest of two
I'm trying to create a regular expression that will match the third instance of
I'm creating a CSS editor and am trying to create a regular expression that
Hey guys - I'm tearing my hair out trying to create a regular expression

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.