我需要一个正则表达式来使用逗号(,)分割字符串,但在以下示例中忽略花括号{,}中的逗号;
"asd", domain={"id"="test"}, names={"index"="user.all", "show"="user.view"}, test="test"
INTO (应该是)
"asd"
domain={"id"="test"}
names={"index"="user.all", "show"="user.view"}
test="test"
问题:(不是这个)
"asd"
domain={"id"="test"}
names={"index"="user.all"
"show"="user.view"}
test="test"
我尝试了这个方法,但它也会将大括号{ }内的逗号分开。
\{[^}]*}|[^,]+
但是我完全不知道这应该以什么样的方式结束。任何帮助都将不胜感激!