<span class="value"> <label>Label Text</label> Some Text </span> <script> var str = document.getElementsByClassName('value')[0].innerHTML str = str.replace(/\n/,'').replace(/<label>.+<\/label>/,'') alert(str) </script>