JSFiddle - React, Tailwind, and code Playground
HTML
<div class="part"> The part number is [8F8S0JJ9]</div>
<div class="part"> The second part number is [V9S7D73]</div>
JavaScript
$('.part').each(function(){
var $this = $(this),
partnum_reg = /(\[(.)+\])/g,
partnum = String($this.html().match(partnum_reg));
$this.html($this.html().replace(partnum, ''));
$('<div/>').insertAfter($this).html(partnum);
});