So, I was interested to find that JSON.stringify reduces a RegExp to an empty object-literal (fiddle):
JSON.stringify
JSON.stringify(/^[0-9]+$/) // \"{}\"
RegExp.prototype.toJSON = RegExp.prototype.toString; var regexp = /^[0-9]+$/; var foo = { rgx: regexp.source, date: new Date }; var stringified = JSON.stringify(foo); new RegExp(JSON.parse(stringified).rgx)