R
R
Rostislav Ignatenko2018-02-26 21:44:02
PHP
Rostislav Ignatenko, 2018-02-26 21:44:02

How to remove all font?

Good afternoon, please tell me how to remove all tags and their contents during data parsing?

$test= preg_replace('/<font.*?<\/font>/is', '', $test);
$test= preg_replace('/^<font.*?<\/font>$/', '', $test);

I tried in such ways, but nothing came of it for the reason that I'm poorly versed in regular expressions. I will be grateful for help.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
twobomb, 2018-02-26
@twobomb

strip_tags won't work?

V
Vladislav Lyskov, 2018-02-27
@Vlatqa

$test = preg_replace("'<font[^>]*?>.*?</font>'si","",$test);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question