JSFiddle - React, Tailwind, and code Playground
by Roko
JavaScript
const str = "Are you here Ed? Have you seen my red baloon"
const searchTxt = "ed?"
const strArr = str.split( new RegExp(searchTxt, 'i') );
console.log(strArr);
by Roko
const str = "Are you here Ed? Have you seen my red baloon"
const searchTxt = "ed?"
const strArr = str.split( new RegExp(searchTxt, 'i') );
console.log(strArr);