如何从 JavaScript 对象中删除属性?

Say I create an object as follows:

var myObject = {
    "ircEvent": "PRIVMSG",
    "method": "newURI",
    "regex": "^http://.*"
};

What is the best way to remove the property regex to end up with new myObject as follows?

var myObject = {
    "ircEvent": "PRIVMSG",
    "method": "newURI"
};

转载于:https://stackoverflow.com/questions/208105/how-do-i-remove-a-property-from-a-javascript-object