-
-
Save maolion/60c97115921f2785bbbd0eb91c71b717 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| function x() { | |
| var patterns = []; | |
| for (var i = 0; i < 9; i++) { | |
| for (var i2 = 0; i2 < 9; i2++) { | |
| patterns.push( | |
| '(?:' + i2 + '<=?' + '['+(i2+1)+'-9](?:\\.\\d*)?|' + i2 + '>=?(?:[0-' + Math.max(i2-1, 0) + '])(?:\\.\\d*)?)' | |
| ); | |
| } | |
| patterns.push('(?:'+ i +'[><]='+ i +')'); | |
| patterns.push('(?:' + i + '<[1-9]\\d+(?:\\.\\d*)?|' + i + '>-\\d(?:\\.\\d*)?)'); | |
| } | |
| return patterns.join('|'); | |
| } | |
| var r = new RegExp('(?:' + x() + ')\\s*&&\\s*(?:' + x() + ')') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment