JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<script>
var output = "hallo world > < "
output = output.replace(/>\s*</g, '><');
document.write(output)
</script>
</body>
<body>
<script>
var output = "hallo world > < "
output = output.replace(/>\s*</g, '><');
document.write(output)
</script>
</body>