daydreamer Posted January 6, 2010 Share Posted January 6, 2010 <h1 id=unique>kdjkjd dwekjnd wk</h1> <div> match any whole sentences between the h1 and script tags only </div> <script> How would I match the whole sentences in this scenario? I am having trouble writing a reg ex for 'match from h1 to script tag'. This will match data between the tags, but it includes line breaks (which I dont need): >[^<]*\b([\s0-9a-zA-Z]+)[^<]*< Cheers Link to comment https://forums.phpfreaks.com/topic/187468-matching-sentences-between-html-tags/ Share on other sites More sharing options...
premiso Posted January 6, 2010 Share Posted January 6, 2010 I believe adding the period will match any character except newline, so adding that in there may help. (I am unsure where, but yea). Link to comment https://forums.phpfreaks.com/topic/187468-matching-sentences-between-html-tags/#findComment-989937 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.