Having issues wish a preg_replace function.
I am formatting a breadcrumb which the php is ioncubed so I am having to preg_replace to remove part of the breadcrumb.
I have a breadcrumb that looks like
<ul>
<li><a href="mylink1.html">Link 1</a><i class="fa fa-angle-right"></i></li>
<li><a href="mylink2.html">Link 2</a><i class="fa fa-angle-right"></i></li>
<li><a href="mylink3.html">Link 3</a></li>
</ul>
What I want to do is completely remove
<li><a href="#">Link 2</a><i class="fa fa-angle-right"></i></li>
My Original thoughts were to just str_replace
<li><a href="#">Link 2</a><i class="fa fa-angle-right"></i></li>
with nothing however the link can vary depending on the language file loaded.
I then thought about preg_replace the content of the url as the href is constant however I have absolutley no experiance with PHP and all attempts I have tried give random responses.
I'm hoping someone can help with the preg_replace or even if there is a better way to remove the line.
So far Ive tried
$str = '<li><a href="mylink.php">Link 2</a></li>';
$preg_replace = preg_replace('<li><a href="mylink.php">(.*)','placeholder',$str);
echo $preg_replace;
Thanks