Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > rfc822 regexp

Reply
Thread Tools

rfc822 regexp

 
 
Vladimir Litovka
Guest
Posts: n/a
 
      02-04-2004
Hi.

I have a problem with writing regular expression There is message's header:

From: blah-blah
To: blah-blah <blah@blah>, blah1 <blah1@blah>,\n\t blah2 <blah2@blah>
Cc: blah3@blah
Subject: rfc822 regexp

and so on. Also, I have some string, which exactly matches part of field
"To:" for example 'blah1 <blah1@blah>'. I need to remove this substring
from field, noting that field can be multiline.

I've spent lots of time and didn't succeed. All I have, doesn't give a
correct result for all combination of commas, spaces, tabs and newlines in
the field.

Am I inventing wheel? Any ideas?

Thank you.

--
Man is incomplete until he is married. Then he is finished.
 
Reply With Quote
 
 
 
 
nobull@mail.com
Guest
Posts: n/a
 
      02-04-2004
Vladimir Litovka <(E-Mail Removed)> wrote in message news:<bvppil$7c7$(E-Mail Removed)>...
> Hi.
>
> I have a problem with writing regular expression There is message's header:
>
> From: blah-blah
> To: blah-blah <blah@blah>, blah1 <blah1@blah>,\n\t blah2 <blah2@blah>
> Cc: blah3@blah
> Subject: rfc822 regexp
>
> and so on. Also, I have some string, which exactly matches part of field
> "To:" for example 'blah1 <blah1@blah>'. I need to remove this substring
> from field, noting that field can be multiline.
>
> I've spent lots of time and didn't succeed. All I have, doesn't give a
> correct result for all combination of commas, spaces, tabs and newlines in
> the field.
>
> Am I inventing wheel?


Yes.

> Any ideas?


Get a wheel off the shelf from CPAN.

> Thank you.


This newsgroup does not exist (see FAQ). Please do not start threads here.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get message/rfc822 attachment name by using JavaMail? shilpa Java 5 05-12-2011 08:07 AM
[regexp] How to convert string "/regexp/i" to /regexp/i - ? Joao Silva Ruby 16 08-21-2009 05:52 PM
JavaMail - RFC822 Rico Java 4 12-25-2004 06:36 PM
Q: xml for rfc822/mime Malcolm Dew-Jones XML 1 05-05-2004 08:09 AM
Dates from Strings in RFC822 format Darren Davison Java 2 07-23-2003 07:27 PM



Advertisments