0

I have a PHP variable named $matches[0] which contains a HTML Code.

So, I want to know if is there a way to remove in PHP any from $matches[0] variable these HTML Tags and/or CSS class:

  • <sup>...</sup> (HTML Tags) ???
  • class="navigation-only" (CSS Class) ???
  • class="noprint wikidata-linkback" (CSS Class) ???

If so, how to do to remove all HTML <sup> and navigation-only and noprint wikidata-linkback CSS Classes ???

Because it will very help me.

  • Does this answer your question? [RegEx match open tags except XHTML self-contained tags](https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags) – GACy20 Jun 07 '22 at 13:51
  • Xpath query on a DOMNode – Honk der Hase Jun 07 '22 at 21:21

0 Answers0