Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] finding, adding string. Re:

From: al::bri::xtra::co::nz at: 20-Aug-2000 8:52

balayo wrote:
> I would like to add a meta tag just under "<head>" to a directory full of
html files, via ftp. I'm struggling a little...can some kind soul help me out?
>> MyDirectory: copy Original
== { <HTML> <HEAD> <TITLE>My Directory</TITLE> </HEAD> <BODY> <H1>My Directory</H1> Blah blah </BODY> </HTML> }
>> parse MyDirectory [
thru "<HEAD>" AfterHead: (insert AfterHead "^/<META Blah>") to end ] == true
>> MyDirectory
== { <HTML> <HEAD> <META Blah> <TITLE>My Directory</TITLE> </HEAD> <BODY> <H1>My Directory</H1> Blah blah </BODY> </HTML> } I hope that helps! Andrew Martin ICQ: 26227169