Bazı html etiketleme otomatikleştirmek için Regex

0 Cevap php

I'm having 800 entries that are very similar, but they need some stuff done to them. The format is like this:

<td class="description">
Describing text.
Might very well be 2 paragraphs
</td>

I need to do some stuff to the text inside the cell. I've tried to use preg_replace('/(.+)<\/td>/'). It ends up with two problems.

  1. I don't manage to fetch what's inside the parenthesis, but it will also fetch the cell tags.
  2. It will fetch everything until the last </td> in the document. I just want it to go to the first occurrence of </td>

Şimdiden teşekkürler

0 Cevap