JSFiddle - React, Tailwind, and code Playground

by David Thomas

JavaScript

var str = "f1/f2/f3/aaa",
    arr = str.match(/(\w+)/g);
console.log(arr)