JSFiddle - React, Tailwind, and code Playground
HTML
<p>12345, 23, 64229, 359</p>
JavaScript
var nums = $('p').text().split(/\s*,\s*/);
var tags = '';
$.each(nums,function(i,val) {
tags += '<a href=http://www.example.com/?id=' + val + '>' + val + '</a><br>'
});
$('body').append(tags);