Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
((?:\d+(?:\.\d+)?)\/(?:\d+(?:\.\d+)?))|((?:[+-]?\d+(?:\.\d+)?)?[+-]?(?:\d+(?:\.\d+)?)?i)|([+-]?\d+(?:\.\d+)?)
/
g
Input 1
1
New
-1 2/5 -0.4 1+3i -i 3i +2i -2i +3 -1+i -1-i +59i
Substitution
\n
-1 2/5 -0.4 1+3i -i 3i +2i -2i +3 -1+i -1-i +59i