TransWikia.com

Regex Multiple Parenthases

Stack Overflow Asked by MatthewProSkils on November 18, 2021

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?

One Answer

just add the global flag g

let regexp = /({)[^}]+(})/g;

Answered by sonEtLumiere on November 18, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP