I have an html page and开发者_如何学Python I want to get the contents in a table. the table starts with grid tag and ends with grid tag,
My function is this:
preg_match_all("/<grid>.*<\/grid>/",$page, $matches,PREG_OFFSET_CAPTURE);
I get a null array.
Don't use a regex, use something like QueryPath - I've used it dozens of times with great success. It works like jQuery, for PHP.
精彩评论