URGENT: Regex to delete all HTML entities except two
$10-30 USD
Færdiggjort
Slået op over 10 år siden
$10-30 USD
Betales ved levering
Hello,
I need a regular expression done as soon as possible.
I have this regular expression that removes all HTML entities (alpha, decimal and hex):
/&(?:[a-z\d]+|#\d+|#x[a-f\d]+);/i
I need a modified regex that will replace all these entities, EXCEPT these two (case insensitive): < >
Example PHP code I have now:
The desired result is:
B A C < D > E <alo F &; G &&; H < I A J A K & asd; L A M A N
Thank you!