Non greedy any character match with regular expressions in PHP?

  • Thread starter Thread starter wheeesh
  • Start date Start date
W

wheeesh

Guest
Trying to match text in between some HTML tags in php - however the text may contain a newline character \n, and my text is between <td height="83" width="594"><div align="justify"> text is here with possible newlines.. </div></td>

The height and width of the td are specific so it will only match this section, however matching the text with ([\s\S])\<\/div\> returns everything after the text has begun to match, and I can't seem to find the right combination to just grab everything before this </div>

heelp!
 
Back
Top