Ling 483/783


Regular Expression Exercise


Email programs have not yet mastered the art of converting between plain text and html formats. This problem becomes especially annoying when someone forwards an html email in plain text. The following email illustrates this problem. Write a perl program that converts this forwarded email to both the html and plain text formats. The program should output two copies of the email, one in html format and the other in plain text.


>content-class: urn:content-classes:message

>Return-Path: <someone@ku.edu>

>X-MimeOLE: Produced By Microsoft Exchange V6.0.6556.0

>X-OriginalArrivalTime: 14 Oct 2004 14:03:48.0120 (UTC) FILETIME=[A0364980:01C4B1F6]

>Subject: FW: CLAS Advisor Hot Line, Holds, and Advising Materials

>Date: Thu, 14 Oct 2004 09:03:47 -0500

>X-MS-Has-Attach:

>X-MS-TNEF-Correlator:

>Thread-Topic: CLAS Advisor Hot Line, Holds, and Advising Materials

>Thread-Index: AcSxWwNIcgAOFAlhROWx/59SEtcalgABzr2wACUAQpA=

>From: "someone " <someone@ku.edu>

>To: "someoneelse \(home\)" <someoneelse@ku.edu>,

>         "second" <second@sunflower.com>,

>         "third" <third@ku.edu>,

>         "fourth" <fourth@ku.edu>,

>

><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">

><HTML>

><HEAD>

><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">

><META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6556.0">

><TITLE>FW: CLAS Advisor Hot Line, Holds, and Advising Materials</TITLE>

></HEAD>

><BODY>

><!-- Converted from text/rtf format -->

>

><P><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">If any of you have questions during advising</FONT>

></P>

>

><P><FONT SIZE=2 FACE="Arial">Dear Colleagues,</FONT>

></P>

>

><P><FONT SIZE=2 FACE="Arial">We in CLAS Undergraduate Services are busy preparing for the upcoming advising period and main enrollment and know that you are, too.&nbsp; We hope the following information will help you and your advisors:</FONT></P>

>

><P><B><FONT SIZE=2 FACE="Arial">CLAS Advisor Hot Line</FONT></B><FONT SIZE=2 FACE="Arial">:&nbsp;</FONT><B> <FONT COLOR="#800000" SIZE=2 FACE="Arial">864-3599</FONT></B><FONT SIZE=2 FACE="Arial">, 8:00 a.m. to noon and 1:00 to 5:00 p.m., Monday through Friday beginning October 18.&nbsp; Our advisors will be available to answer questions from department advisors.&nbsp; For non-advising questions and over the noon hour, please call our main number 864-3500.</FONT></P>

>

><P><B><FONT SIZE=2 FACE="Arial">Graduation Briefings:&nbsp;</FONT></B> <FONT SIZE=2 FACE="Arial">These are small group meetings for students who plan to graduate Spring 2005.&nbsp; Students may register for these meetings by stopping by 109 Strong Hall or calling 864-3500.&nbsp; The meetings are Monday through Friday the first two weeks of November, 9:30 - 10:30 and 1:30 - 2:30.&nbsp; Students will receive the Application for Degree at the meeting.</FONT></P>

>

><P><B><FONT SIZE=2 FACE="Arial">Freshman/Sophomore Advising Hold:&nbsp;</FONT></B> <FONT SIZE=2 FACE="Arial">The hold has been placed on student records for all CLAS students with fewer than 60 completed hours.&nbsp; Please remove the hold (service indicator) after the student has met with an advisor.&nbsp; </FONT></P>

>

><P><B><FONT SIZE=2 FACE="Arial">Senior Undeclared Major Hold</FONT></B><FONT SIZE=2 FACE="Arial">:&nbsp; The hold has been placed on student records for all CLAS students who will have completed 90 or more hours after this semester and have not yet declared a major.&nbsp; We in CLAS Undergraduate Services will remove this hold when the student brings us a completed Major Declaration Form or a request from a department to release the hold.</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">&nbsp;</FONT> <FONT SIZE=2 FACE="Arial">We make exceptions to this requirement for students who clearly are pursuing a major but for some reason are not yet admissible&nbsp; to the major or school.</FONT></P>

>

><P><FONT SIZE=2 FACE="Arial">By noon tomorrow, we will have delivered to your department Major Declaration Forms, Minor Declaration Forms, Major Certification Forms, and Minor Certification Forms (as appropriate for your department).&nbsp; </FONT></P>

>

><P><FONT SIZE=2 FACE="Arial">Questions?&nbsp; E-mail me at PamHouston@ku.edu or call me at 4-3505.</FONT>

></P>

>

><P><FONT SIZE=2 FACE="Arial">Pam Houston, Director </FONT>

>

><BR><FONT SIZE=2 FACE="Arial">CLAS Undergraduate Services</FONT>

></P>

><BR>

>

></BODY>

></HTML>

>