A user will supply HTML, it may be valid or invalid (malformed). I need to be able to determine such things as:
- Is there a style tag in the body
- Is there a div that has a style attribute that makes use of width or background-image.
I have tried using the DOMDocument class but it can only do 1 and not 2 with xPath.
I have also tried simple_html_dom and that can only do 1 but not 2.
Do you think its a good idea that I just use regular expressions or is there something that I haven't thought of?