JSFiddle - React, Tailwind, and code Playground
by ipr101
JavaScript
var portionremoved;
var string = '1234GF'
string = string.replace(/(\d+)([A-Z]+)/,function (removed,first,second) {
portionremoved = first;
return second;
});
alert(portionremoved);
alert(string);