firedealer Posted May 10, 2011 Share Posted May 10, 2011 I know the regex_pattern is wrong. Help me out? <?php $content = "<html><head><title>Your IP</title></head><body>Your IP Address: 63.1.142.154</body></html>"; $regex_pattern = "/<body>([^>]*)<\/body>/si"; $preg_match($regex_pattern,htmlspecialchars($content),$matches); print_r( $matches ); ?> Quote Link to comment https://forums.phpfreaks.com/topic/235973-get-a-content-between-and/ 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.