regex all not numbers

C++
echo 1a2b3c | sed 's/[^0-9]//g'	#Replaces all not numbers
abc
Source

Also in C++: