I created this regex to match all integers and floats in polynomials.
This regex MATCHES:
All of the above + " not followed by "
GROUPS returned:
Note:
so be careful when dealing with the order of the groups returned
Probably I'll create another version where it doesn't matter if the number is returned int or float, but I think I'll leave it as it is because it's more precise.