Jump to content

[SOLVED] Urgent regex help please :)


therealwesfoster

Recommended Posts

My code:

 

<?php
$file = '<div class="body">my
stuff</div>';

echo preg_match('/\<div class="body">(.\s*)\<\/div>/im',$file,$match);
?>

 

I'm trying to match what is in between the <div> tags. I know how to match regularly, but there is a newline in-between the <div> tags. I can't figure out how the make it match that.

 

Please help,

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/105868-solved-urgent-regex-help-please/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.