これらの集約された電子メールの中に名前と電子メールアドレスがたくさんあり、文書全体でFirst Last <[email protected]>
以外のすべてを取り除きたいと思っています。基本的に私は、私はこれだけのテキストから...正規表現は特定の単語の後に2つの名前と<電子メールアドレス>以外のものすべてに一致します
Name Wood <[email protected]>
Name Wood <[email protected]>
を一致させたい
From: Name Wood <[email protected]>
Subject: Yelp entries for iPod contest
Date: April 20, 2012 12:51:07 PM EDT
To: [email protected]
Have had a great experience with .... My Son ... is currently almost a year into treatment. Dr. ... is great! Very informative and always updates us on progress and we have our regular visits. The ... buck program is a great incentive which they've implemented to help kids take care of their teeth/braces. They also offer payment programs which help for those of us that need a structured payment option. Wouldn't take my kids anywhere else. Thanks Dr. ... and staff
Text for 1, 2, and 3 entries to Yelp
Hope ... wins!!
Begin forwarded message:
From: Name Wood <[email protected]>
Subject: reviews 2 and 3
Date: April 20, 2012 12:44:26 PM EDT
To: [email protected]
Have had a great experience with ... Orthodontics. My Son ... is currently almost a year into treatment. Dr. ... is great! Very informative and always updates us on progress and we have our regular visits. The ... buck program is a great incentive which they've implemented to help kids take care of their teeth/braces. They also offer payment programs which help for those of us that need a structured payment option. Wouldn't take my kids anywhere else. Thanks Dr. ... and staff
Have had a great experience with...
...持っています。だから基本的には、単語"From: "
とを除いた"<"+email address+">"
という単語の次の2つの単語と一致させたい。私は2つの全体の単語(何とか{0,2}
を使って)を検索し、<
の文字からもう1つの>
までの電子メールアドレスを検索することは、否定的な先読みであると考えています。
どのような正規表現の実装を使用しますか? Perl? Python? Java?他に何か? – alan