Created
February 23, 2010 16:10
-
-
Save sjoerdvisscher/312344 to your computer and use it in GitHub Desktop.
Browsers completely disagree what \s should match
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var r = /\s/, a = []; | |
for (var i = 0; i < 0x10000; i++) | |
if (r.test(String.fromCharCode(i))) | |
a.push(i.toString(16)); | |
document.write(a); | |
</script> | |
<p>IE: 9,a,b,c,d,20</p> | |
<p>FF: 9,a,b,c,d,20,a0,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,200a,200b,2028,2029,3000</p> | |
<p>Chrome/Safari/Opera: | |
9,a,b,c,d,20,a0,1680,180e,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,200a,2028,2029,202f,205f,3000</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment