HTML name 属性を解析し、ネストされた各配列を一致として返す正規表現スクリプトを作成しようとしています。次に例を示します。
<input type="text" name="contact[email]" />
<input type="text" name="contact[address][street]" />
これらを解析し、この方法で一致させるjavascript正規表現が必要です
Match 1: contact Match 2: email
Match 1: contact Match 2: address Match 3: street
私が持っている現在の正規表現は次のとおりです。
/(^.*?)(\[(.*?)\])?$/
ありがとう!