Obviously this is surrounded by <title> and </title> tags, so I tried a condition "Contents contain match" and the [anything] token. But it doesn't work.

I have tried this with the file in plain text, HTML, and PDF.
Am I right in thinking that Hazel ignores anything in < > on the grounds that it isn't content?