any way I can split this string x+5-3+x=6+x-2
while keeping the separators, I tried regex split on [\+\-]
but this gives me, x, 5, 3, ...
and I need x, +5, -3, +x
using (?=[-+])
as in Java doesn't work.
Thanks
any way I can split this string x+5-3+x=6+x-2
while keeping the separators, I tried regex split on [\+\-]
but this gives me, x, 5, 3, ...
and I need x, +5, -3, +x
using (?=[-+])
as in Java doesn't work.
Thanks
use FindAllString
regexp.MustCompile(`[-+\?=]?([0-9]|x)`).FindAllString("x+5-3+x=6+x-2", -1)