Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.