http://cboard.cprogramming.com/c-programming/135536-how-get-all-numbers-regex.html

should get you started on finding integers within a string.