1 回答

TA貢獻(xiàn)1772條經(jīng)驗(yàn) 獲得超5個(gè)贊
如果我理解正確
^\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
添加回答
舉報(bào)