in reply to Regular expression to match an A=B type string needs help in storing matched parts of string
Consider 'use strict'. It would have caught this.