title: Serialization of RegExp
body: <p>So, I was interested to find that <code>JSON.stringify</code> reduces a RegExp to an empty object-literal (<a href="http://jsfiddle.net/3mHrw/" rel="noreferrer">fiddle</a>):</p>
  
  <pre><code>JSON.stringify(/^[0-9]+$/) // "{}"
  </code></pre>
  
  <p>Is this behavior expected? I realize that a RegExp is an object with no properties to serialize. That said, dates are objects too; yet <code>JSON.stringify()</code> manages to produce a meaningful string:</p>
  
  <pre><code>JSON.stringify(new Date) // "2014-07-03T13:42:47.905Z"
  </code></pre>
  
  <p>I would have hoped that JSON would give RegExp the same consideration by using <codE>RegExp.prototype.<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/toString" rel="noreferrer">toString()</a></code>.</p>