How to do a replace using regex of a sentence with variable content in the middle and the end containing “/” [duplicate]

I’m having difficulty replacing content where I only know the beginning and end, where it’s also a problem to replace due to (“/”). This is the line of code I need to remove.

<div class="inputIcon -lft"><svg><use href="**variable content**"></use></svg></div>

.replaceAll(/<div class="inputIcon -lft">(.*)div>/g,'')