JSFiddle - React, Tailwind, and code Playground

by Ozgur Ozer

JavaScript

const str = '/c/cate'
const pattern = /(^\/$)|(^\/\w{1,2}\/)/
const testRegexp = pattern.test(str)
console.log(str)
console.log(testRegexp)