-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
  • 284
  • 1
  • 10

1 Answers1

0

just add the global flag g

let regexp = /(\{)[^}]+(\})/g;
sonEtLumiere
  • 3,656
  • 3
  • 4
  • 24