As the title says I have a string like this:
$string = "Hello World<br>hello world<br><br>";
I would like to get rid of the <br>
s at the end of the string so it looks as follows:
$string = "Hello World<br>hello world";
I tried this:
preg_replace('/^(<br>)*/', "", $string);
but it didn't work.
Maybe someone knows the right regex.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…