> h <- "<html><p>Cat<sup>a</sup></p><p>Dog</p></html>"
> sub("<sup.*sup>","",h)

Probably safer to do  

gsub("<sup.*?sup>","",h)

to avoid replacing multiple superscripts.

eg 
h2 <- 
"<html><p>Cat<sup>a</sup></p><p>Dog</p><p>Mouse<sup>a</sup></p><p>Raccoon</p></html>"
sub("<sup.*sup>","",h2)                 #drops everything between first <sup 
and last sup>
gsub("<sup.*?sup>","",h2)            #Drops each <sub>xxx</sup>


*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to