Dave selby <[EMAIL PROTECTED]> [2003:10:19:11:37:44+0100] scribed: > I need to get the contents of a HTML title tag & put it in a string. > > ie > <title>specialist cards</title> > > I need the "specialist cards" in a variable $titlecontents > I thought it would be easy with sed > > sed -n '/<title>/,/<\/title>/p' > > But no go. I have tried various ways but to no avail.
Which of these best meets your loosely described needs? sed -n '/^<title>[^><]*<\/title>/p' sed -n '/<\/*title>/p' sed -n 's!</*title>!!gp' hth -- Best Regards, mds mds resource 877.596.8237 - Dare to fix things before they break . . . - Our capacity for understanding is inversely proportional to how much we think we know. The more I know, the more I know I don't know . . . --
pgp00000.pgp
Description: PGP signature