JSFiddle - React, Tailwind, and code Playground

by khushboo097

JavaScript

const regex = /(?!([abc\/pqr]))([a-zA-Z]).*/gmi;
const str = 'abc/pqr/xyz/efg/abc';
let m;

console.log(str.match(regex)[0].split('\/'));