I want to extract each arithmetic formula from this string:
+100*25-30
I used this regex:
preg_match_all("/(([\*\+\-\/])([0-9]+\.?[0-9]*))+/", "+100*25-30", $match);
It is capturing only last occurrence which is -30 but if I enter space before operator like this: +100 *25 -30, it is capturing all correctly, but I should do it without space. How to do it?