rfc822 regexp

  • Thread starter Vladimir Litovka
  • Start date
V

Vladimir Litovka

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.
 
N

nobull

Vladimir Litovka said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,481
Members
44,900
Latest member
Nell636132

Latest Threads

Top