fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. const char *s="at+recv_data=open,0,49247,192.168.123.2";
  5. char x[100],y[100];
  6. int i;
  7. if( 3==sscanf(s,"%*[^=]=%[^,],%d,%*d,%s",x,&i,y))
  8. printf("%s%d%s",x,i,y);
  9. return 0;
  10. }
  11.  
Success #stdin #stdout 0s 4276KB
stdin
Standard input is empty
stdout
open0192.168.123.2