Javascript port of dimka665's numeric range to regex generator
To use, simply clone repository and source range2regex.js in your code
Example: ``` <script src="range2regex.js"> <script> console.log( split_to_patterns( 5, 10 ) ) // ["[5-9]", "10"] console.log( split_to_patterns( 5, 10 ).join('|') ) // "[5-9]|10" </script> ```