#include <stdio.h>
#include <string.h>
int main(void) {
char row[] = "11/12/1999 foo:54654 some data..... ms:12123343 hot:32";
char *ms;
int i;
if (ms == NULL) /* error: no "ms:" in row */;
if (sscanf(ms
+ 3, "%d", &i
) != 1) /* error: invalid data */; printf("ms value is %d.\n", i
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KCmludCBtYWluKHZvaWQpIHsKICAgIGNoYXIgcm93W10gPSAiMTEvMTIvMTk5OSBmb286NTQ2NTQgc29tZSBkYXRhLi4uLi4gbXM6MTIxMjMzNDMgaG90OjMyIjsKICAgIGNoYXIgKm1zOwogICAgaW50IGk7CgogICAgbXMgPSBzdHJzdHIocm93LCAibXM6Iik7CiAgICBpZiAobXMgPT0gTlVMTCkgLyogZXJyb3I6IG5vICJtczoiIGluIHJvdyAqLzsKICAgIGlmIChzc2NhbmYobXMgKyAzLCAiJWQiLCAmaSkgIT0gMSkgLyogZXJyb3I6IGludmFsaWQgZGF0YSAqLzsKICAgIHByaW50ZigibXMgdmFsdWUgaXMgJWQuXG4iLCBpKTsKICAgIHJldHVybiAwOwp9Cg==