You can't.
There is only one thing which even comes close, and that is a scan set (or it's complement).
Eg.
[tt]scanf( "%[0-9]", myNumStr );[/tt]
Which in regex terms is [tt][0-9]+[/tt]
If you want anything more complicated than that, then the best thing to do is read a line using fgets(), then use one of the standard regex packages and parse the line yourself.
--
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.