One regexp function is below:-
$(document).ready(function(){
$('button').click(function(){
var str = 'abcdefghijklmnopqrstuvwxyz';
var spl = str.match(/input/g);//i need string match depent on value of input
$('#demo').text(spl);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<input type="text" id="text">
<button>call</button>
<p id="demo"></p>
input k out k;
input y out y;
Thanks in advance...