renovations

This commit is contained in:
Ilya Kantor 2015-03-23 10:49:30 +03:00
parent c6803faefd
commit 3889056599
22 changed files with 267 additions and 10 deletions

View file

@ -0,0 +1,13 @@
Целое число с необязательной дробной частью -- это <code class="pattern">\d+(\.\d+)?</code>.
К этому нужно добавить необязательный `-` в начале:
```js
//+ run
var re = /-?\d+(\.\d+)?/g
var str = "-1.5 0 2 -123.4.";
alert( str.match(re) ); // -1.5, 0, 2, -123.4
```