Const
Captures the individual elements of a numeric string.
Capture groups:
0
"2 1/3"
1
"-"
"-2 1/3"
2
"2"
"1"
"1/3"
3
" 1/3"
".33"
"2.33"
"/3"
Capture group 2 may include comma/underscore separators.
numericRegex.exec("1") // [ "1", "1", null, null ]numericRegex.exec("1.23") // [ "1.23", "1", ".23", null ]numericRegex.exec("1 2/3") // [ "1 2/3", "1", " 2/3", " 2" ]numericRegex.exec("2/3") // [ "2/3", "2", "/3", null ]numericRegex.exec("2 / 3") // [ "2 / 3", "2", "/ 3", null ] Copy
numericRegex.exec("1") // [ "1", "1", null, null ]numericRegex.exec("1.23") // [ "1.23", "1", ".23", null ]numericRegex.exec("1 2/3") // [ "1 2/3", "1", " 2/3", " 2" ]numericRegex.exec("2/3") // [ "2/3", "2", "/3", null ]numericRegex.exec("2 / 3") // [ "2 / 3", "2", "/ 3", null ]
Captures the individual elements of a numeric string.
Capture groups:
0
"2 1/3"
from"2 1/3"
1
"-"
from"-2 1/3"
2
"2"
from"2 1/3"
;"1"
from"1/3"
3
" 1/3"
from"2 1/3"
;".33"
from"2.33"
;"/3"
from"1/3"
Capture group 2 may include comma/underscore separators.