I plan to use regular epressions (I think they will be best) to search through a html document just as it is saved to a database and to record all of the following

tags

a tag is any hyper link where the rel="tag" is set and the end of the url (from the last / ) and the link text match (space and + is considered matched).

I want to pull this data into an array so that I can sort it carry out a few clean up's etc and then store the metadata for easy reference later.

I'm sure of everything I need to do other than the reg ex to array bit.

Any help greatly apriciated