Hello , I am using this forum often to inform myself but it is the first time I post, excuse me pls if is not the correct category. My knowledge in php coding are basic.
I have a Joomla site and need to do some modification in the category menu display, After some researches I found the code (see lower) and is working but my problem is that it is showing the first image in the content which is a banner module inserted with an extension called "module anywhere" but what I really need is to extract the first Tag img. , not the images from this module

I understand that there is a img. string which says to pull the first tag/meta image found in the article... or other similar. I really appreciate any help or ideas.

Txs in advance
This is what I am working on:


<?php if ($this->item->sectionid == 5) : ?>
<?php preg_match('/<img (.*?)>/', $this->item->text, $match); ?><a href="<?php echo $this->item->readmore_link; ?>"><?php echo $match[0]; ?> </a>
<?php else : ?>
<?php echo (JFilterOutput::ampReplace($this->item->text)); ?>
<?php endif; ?>