G
Guest
I basically am trying to match something like keyword: (the : and space is a
marker. I want everything after that all the way up to the next Keyword:
(where keyword HAS to begin a new line. I want everything before the next
keyword.
(\: ).*(\n[a-zA-z]) comes extremely close except for 2 things.
The most important is that it is unable to match patterns where the
"content" that I want spans multiple lines . For example in an e-mail it
would skip over
Received: from unknown (HELO barracuda.domain.com) (127.0.0.1)
by 192.168.2.195 with SMTP; 24 Feb 2005 19:16:52 -0000
Also I am wondering if there is a way to specify that I want everything
"after" the \: and before the \n .
Any help would be greatly appreciated. Below are sample regex and sample
input that I am trying to use. and yes google may have bastardized some of
the input
Regex that I have tried. The first one has produced the closest results.
(\: ).*(\n[a-zA-z])
(\: ).*[(\n\s)].*(\n[a-zA-z])
(\: ).*[(\n\s)].*[^\n[a-zA-Z]]*(\n[a-zA-Z])
----------------------------------------
Input
-------------------------------------------
Return-Path: <[email protected]>
Delivered-To: (e-mail address removed)
Received: (qmail 21118 invoked from network); 16 Mar 2005 20:41:33
-0000
Received: from unknown (HELO barracuda.domains.com) (192.168.192.194)
by 192.168.2.195 with SMTP; 16 Mar 2005 20:41:33 -0000
X-ASG-Debug-ID: 1111005918-25079-3-0
X-Barracuda-URL: http://barracuda.domains.com:8000/cgi-bin/mark.cgi
X-ASG-Whitelist: Sender
X-ASG-Whitelist: Sender
X-ASG-Whitelist: Sender
Received: from domaindev1.domain.local (192-168-1-100.generator.isp.com
[192.168.1.100])
by barracuda.domains.com (Spam Firewall) with ESMTP
id AFE2D20A2F39; Wed, 16 Mar 2005 14:45:18 -0600 (CST)
Received: from tetco634 ([192.168.5.193]) by domaindev1.domain.local
with Microsoft SMTPSVC(6.0.3790.211);
Wed, 16 Mar 2005 14:45:44 -0600
From: "user bleah" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>,
<[email protected]m>
X-ASG-Orig-Subj: New User Signup
Subject: New User Signup
Date: Wed, 16 Mar 2005 14:45:44 -0600
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_00100_01C52A36.D545F720"
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
Thread-Index: AcUqaR/LUDk7Lu7bQdu3vY6SjqLPAQ==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Message-ID: <domainDEV1RapPodByDl00000...@domaindev1.domain.local>
X-OriginalArrivalTime: 16 Mar 2005 20:45:44.0462 (UTC)
FILETIME=[1FDFCAE0:01C52A69]
X-Virus-Scanned: by Barracuda Spam Firewall at domains.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of
TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=6.0
This is a multi-part message in MIME format.
------=_NextPart_000_00100_01C52A36.D545F720
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit
marker. I want everything after that all the way up to the next Keyword:
(where keyword HAS to begin a new line. I want everything before the next
keyword.
(\: ).*(\n[a-zA-z]) comes extremely close except for 2 things.
The most important is that it is unable to match patterns where the
"content" that I want spans multiple lines . For example in an e-mail it
would skip over
Received: from unknown (HELO barracuda.domain.com) (127.0.0.1)
by 192.168.2.195 with SMTP; 24 Feb 2005 19:16:52 -0000
Also I am wondering if there is a way to specify that I want everything
"after" the \: and before the \n .
Any help would be greatly appreciated. Below are sample regex and sample
input that I am trying to use. and yes google may have bastardized some of
the input
Regex that I have tried. The first one has produced the closest results.
(\: ).*(\n[a-zA-z])
(\: ).*[(\n\s)].*(\n[a-zA-z])
(\: ).*[(\n\s)].*[^\n[a-zA-Z]]*(\n[a-zA-Z])
----------------------------------------
Input
-------------------------------------------
Return-Path: <[email protected]>
Delivered-To: (e-mail address removed)
Received: (qmail 21118 invoked from network); 16 Mar 2005 20:41:33
-0000
Received: from unknown (HELO barracuda.domains.com) (192.168.192.194)
by 192.168.2.195 with SMTP; 16 Mar 2005 20:41:33 -0000
X-ASG-Debug-ID: 1111005918-25079-3-0
X-Barracuda-URL: http://barracuda.domains.com:8000/cgi-bin/mark.cgi
X-ASG-Whitelist: Sender
X-ASG-Whitelist: Sender
X-ASG-Whitelist: Sender
Received: from domaindev1.domain.local (192-168-1-100.generator.isp.com
[192.168.1.100])
by barracuda.domains.com (Spam Firewall) with ESMTP
id AFE2D20A2F39; Wed, 16 Mar 2005 14:45:18 -0600 (CST)
Received: from tetco634 ([192.168.5.193]) by domaindev1.domain.local
with Microsoft SMTPSVC(6.0.3790.211);
Wed, 16 Mar 2005 14:45:44 -0600
From: "user bleah" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>,
<[email protected]m>
X-ASG-Orig-Subj: New User Signup
Subject: New User Signup
Date: Wed, 16 Mar 2005 14:45:44 -0600
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_00100_01C52A36.D545F720"
X-Mailer: Microsoft Office Outlook, Build 11.0.6353
Thread-Index: AcUqaR/LUDk7Lu7bQdu3vY6SjqLPAQ==
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
Message-ID: <domainDEV1RapPodByDl00000...@domaindev1.domain.local>
X-OriginalArrivalTime: 16 Mar 2005 20:45:44.0462 (UTC)
FILETIME=[1FDFCAE0:01C52A69]
X-Virus-Scanned: by Barracuda Spam Firewall at domains.com
X-Barracuda-Spam-Score: 0.00
X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of
TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=6.0
This is a multi-part message in MIME format.
------=_NextPart_000_00100_01C52A36.D545F720
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit