-1

I have a pretty simple piece of regex code: (\{)[^}]+(\}) , which only gets the first set of ({)[^}]+(}). Is there a way to get all sets of brackets?

MatthewProSkils
  • 314
  • 1
  • 13

1 Answers1

0

just add the global flag g

let regexp = /(\{)[^}]+(\})/g;
sonEtLumiere
  • 3,650
  • 3
  • 7
  • 26