extract_num function

Extract numbers from string.