Skip to content

Commit

Permalink
correct sorting of scientific notation & number first alphanumerics; …
Browse files Browse the repository at this point in the history
…fixes issue overset#8
  • Loading branch information
Mottie committed Feb 10, 2013
1 parent cb2cc16 commit 0ea168c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion naturalSort.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/*jshint unused:false */
function naturalSort (a, b) {
"use strict";
var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?$|^0x[0-9a-f]+$|[0-9]+)/gi,
var re = /(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,
sre = /(^[ ]*|[ ]*$)/g,
dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,
hre = /^0x[0-9a-f]+$/i,
Expand Down

0 comments on commit 0ea168c

Please sign in to comment.