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 Quote 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). Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.