I'm trying to extract an array of "<div>" and I am confounded by why this these two patterns work...

        preg_match_all('/<div class="date">.*?/m',$htm,$a);
        preg_match_all('/<div.*?</div>/m',$htm,$a);

But this one does not return anything...

        preg_match_all('/<div class="date">.*?<\/div>/m',$htm,$a);

Is there some regular expresion magic I am missing?

Recommended Answers

All 2 Replies

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.