Possible Duplicate:
How to parse and process HTML with PHP?
How to parse HTML with PHP?
I am trying to get what's inside a body tag using regex, but it doesn't work in some cases.
For example if a web page has:
<body>text</body>
it will work, but it won't work if the body tag has a class or something defined, like
<body class="something">text</body>
I need the regex to work on both cases.