問題タブ [xregexp]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - javascriptで正規表現または正規表現を使用してパターンのすべてのインスタンスを見つける方法
私はこの文字列を持っています
messages: { ... }xregexp (または別のソリューション) を使用して javascriptのすべてのインスタンスを見つけるにはどうすればよいですか?
これ/messages: (\{(?>[^{}]+|(?1))*\})/gはphpでは機能しますが、javascriptでは機能しません
xregexpまた、再帰を使用してそれを理解できませんでしたhttp://xregexp.com/api/#matchRecursive
https://repl.it/@RezaRahmati/xregexpを試しました
しかし、Unbalanced delimiter found in stringエラーが発生します
アップデート
@ vs97 と @barmar のコメントとして、私はmessages: (\{.+\})複数行で試して動作しましたが、単一行の場合でも問題が発生します

