JSFiddle - React, Tailwind, and code Playground

by Liaqat Saeed

HTML

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<input type="text" id="teststring" />

<span id="output"></span>

JavaScript

$('#teststring').on('keyup',function(){
var regex = /[^0-9\.\:]/g;
var value =$(this).val();
$('#output').text(value.replace(regex,""));
})