I\'m reading in a file and after reading in a number, I want to skip to remaining part of that line. An example of a file is this
2 This part should be skipp
I wanted to parse the /proc/self/maps file, but only wanted the first 2 columns (start and end of address range). This worked fine with Linux gcc.
scanf("%llx-%llx %*[^\n]\n", &i, &e);
The trick was "%*[^\n]\n" which means skip a sequence of anything except the end of line, then skip the end of line.