Skip to content

Instantly share code, notes, and snippets.

@goofballLogic
Last active September 26, 2016 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save goofballLogic/61e4e7df3e7671b9ff66114a32c8ad9d to your computer and use it in GitHub Desktop.
Save goofballLogic/61e4e7df3e7671b9ff66114a32c8ad9d to your computer and use it in GitHub Desktop.
Not sure that serialization "works"
> new RegExp( "/" )
/\//
> var x = new RegExp( "/" )
undefined
> x.test( "/hello" )
true
> var y = new RegExp( x.toString() )
undefined
> y.test( "/hello" )
false
> x
/\//
> y
/\/\/\//
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment