JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//code.jquery.com/jquery-2.2.1.min.js"></script>
<div class="string">
</div>
JavaScript
$text = $('.string').text("http://www.text.com");
if ($text.startsWith('http://')) {
$text.replace('http://','');
}
else if ($text.startsWith('https://')) {
$text.replace('https://','');
}