1 回答
TA贡献1772条经验 获得超5个赞
如果我理解正确
^\s*"\s*\[\s*[0-9]+\s*(?:\,\s*[0-9]+\s*)*\]\s*"(?:\s*,\s*"\s*\[\s*[0-9]+\s*(?:\,\s*[0-9]+\s*)*\]\s*")*\s*$
^ # Begin of string
\s* # Leading wsp
" \s* # Quote start of array
\[ # Array opening
\s* [0-9]+ \s*
(?: # Optional nesting elements comma plus digits
\, \s*
[0-9]+ \s*
)*
\] # Array close
\s*
" # Quote end of array
(?: # Optional many more arrays
\s* , \s*
" \s*
\[
\s* [0-9]+ \s*
(?:
\, \s*
[0-9]+ \s*
)*
\]
\s*
"
)*
\s* # Trailing wsp
$ # End of string
添加回答
举报