what are the meanings of cx and escapable? #36

Open
wangyu0248 opened this Issue Jul 16, 2012 · 3 comments

Comments

Projects
None yet
3 participants

var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,

escapable = /[\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,

I have looked for a while, but can't figure out the ascii means of these two RegExp, can any one tell me where i can find some usefull informations?

Owner

douglascrockford commented Jul 16, 2012

There are some characters that the browsers mess up. So json2 escapes
them so that JSON can be embedded in HTML.

but why these Unicode are considered but others such as \u17b2 \u17b3 ...are not considered?

I mean how these RegExp come from? is there any article that i can refer to ?

thank you !

felquis commented Apr 5, 2016

I mean how these RegExp come from? is there any article that i can refer to ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment