fork(23) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. char data[] = "<message%20type%3D\"info\"%20code"
  6. "%3D\"20005\">%20<text>Conference%"
  7. "20successfully%20modified</text>%"
  8. "20<data>0117246</data>%20%20</mes"
  9. "sage>%20";
  10. char *p1, *p2;
  11. p1 = strstr(data, "<text>");
  12. if (p1) {
  13. p2 = strstr(p1, "</text>");
  14. if (p2) printf("%.*s\n", p2 - p1 - 6, p1 + 6);
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 2008KB
stdin
Standard input is empty
stdout
Conference%20successfully%20modified