help

Andrew Stribblehill a.d.stribblehill@durham.ac.uk
Fri, 30 Aug 2002 17:05:21 +0100


Quoting Alastair Reid <alastair@reid-consulting-uk.ltd.uk> (2002-08-30 02:09:50 BST):
> 
> Your message seems to be about removing HTML tags from an HTML document.
> Unfortunately, I had trouble reading your mail because... it was full
> of HTML tags.  
> 
> >>>>> "yan" == yan zhong <zhongyan43@hotmail.com> writes:
> 
> > <html><div style='background-color:'><DIV> <P class=MsoNormal
> > style="MARGIN: 0cm 0cm 0pt"><FONT face="Times New Roman" size=2>Dear
> > sir/madum</FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm
> > 0pt"><SPAN style="mso-spacerun: yes"><FONT face="Times New Roman"
> > size=2></FONT></SPAN>&nbsp;</P> <P class=MsoNormal style="MARGIN:
> > 0cm 0cm 0pt"><FONT face="Times New Roman" size=2>I am a Haskell
> > beginner; I got the problem in use Haskell because I never touch it
> > before. Can you help me to solve the following two exercises
> > please?</FONT></P> <P class=MsoNormal style="MARGIN: 0cm 0cm
> > 
> > [SNIP, SNIP]
> 
> You're more likely to get useful responses if you resend your mail 
> as normal (i.e., ASCII) text.

...but not _much_ more likely. We don't do people's homework for
them.

However, a hint for the first one. Write a function of type String ->
[String] that tokenises then another one that determines if a set of
tokens comprises an HTML element (that's [String] -> Bool). Using
this and a bit of cunning, you should get there.

-- 
DOVER WIGHT PORTLAND
SOUTHWEST VEERING NORTHWEST 4 OR 5. DRIZZLE AT TIMES. MODERATE OR
POOR BECOMING GOOD