The default sample.sgreprc does not contain the HTML macros so the examples in
<http://www.cs.helsinki.fi/~jjaakkol/sgrepexamples.html> fail.
This has been reported as Debian bug #57627. See <http://www.debian.org/Bugs/db
/57/57627.html>.
Here is a subset of the announced macros. HTML_HREF is too difficult for me :-)
define(NAMED_ELEMS,`( "<$1>" or ( ("<$1 " or "<$1\t" or "<$1\n") .. ">")) ..
"</$1>"')
define(NAMED_STAG,`( "<$1>" or ( ("<$1 " or "<$1\t" or "<$1\n") .. ">"))')
define(HTML_TITLE,"<TITLE>" or ( ("<TITLE " or "<TITLE\t" or "<TITLE\n") .. ">
") .. ( "</TITLE>" ))
define(HTML_H1,NAMED_ELEMS(H1))