Template.k1.events({ 'submit #comment_box': function(){ event.preventDefault(); var k11 = event.target.comment_now.value; var k12 = event.target.comment_1.value; var k14 = k11.trim(); //alert(new RegExp('/^' + k12 + '/')) //check if there is existing comments in same post const count3 = PostComment.find({post_id:{$regex:new RegExp('^' + k12)}}).count(); //like 'pa%' //alert('Post id is '+k12+' comment text is '+k14+' and the total post and comment count is '+count3); var a = 0; var b = 0; var c = 0; var k123 = 0; var count4 = 0; var k141; if(count3 == 0) { a = '_1'; k123 = k12...