Help me catch this sneaky regex bug.
function findLostPearls(text) {
const pearlRegex = new RegExp("\bpearl(s)?\b", "g");
return text.match(pearlRegex);
}
const treasureMap = "Many pearls scattered. A single pearl lies here. No perls!";
console.log(findLostPearls(treasureMap));
Reply with what is broken and how you would fix it.