JSFiddle - React, Tailwind, and code Playground
by mblase75
HTML
<p>your cheque number is :AA12GH56 <br />
your bank credit balance is :32,999</p>
JavaScript
$('p').click(function() {
var cheque_no = $(this).text().split(':')[1].split('your')[0];
cheque_no = $.trim(cheque_no); // remove whitespace
alert(cheque_no);
});