JSFiddle - React, Tailwind, and code Playground

by Pankaj Kargirwar

JavaScript

let arr = [
  'bill-items',
  'bills',
  'customer-return-items',
  'customer-returns'
]

let re = new RegExp('^b*')

arr.forEach((e) => {
  console.log(`Matching ${e}: ` + re.test(e))
})