regex for a digits

C++
^[0-9]
Source

Also in C++: