Possible Duplicate:
How to parse and process HTML with PHP?
I expect this one to return (bool)True or int(1)
echo var_dump(preg_match('/(<[tT][eE][xX][tT][aA][rR][eE][aA][^<>]*>)(.*?)(<\/[tT][eE][xX][tT][aA][rR][eE][aA]>)/',
"<textarea id='field-static_content' name='static_content' class='texteditor' ><p>
any content<p></textarea>"));
But I get int(0) as a result.
I try to match any string with "<textarea
" (non case sensitive) followed by any other character but "<" and ">", followed by ">", followed by any other character, and then ended by "</textarea>
" non case sensitive
Do anyone know what's wrong with my regex pattern?