JSFiddle - React, Tailwind, and code Playground

JavaScript

var str="itss[BACK][BACK][BACK][BACK][BACK][BACK] it's a test stringgg[BACK][BACK]";
var dat = str.split('[BACK]').filter(function(e){return e})[1];
alert(dat);