Ethernet Shield Client - Read the monitor

Hi, I've created a program which prints a webpage (page.txt) on the serial monitor. (Arduino uno and ethernet shield V2 connected to a webpage )

Now, I would like to analyse this text (printed on my monitor), that my Arduino recognizes the word "sapa" in this text and polarizes a pin.

However my monitor not only prints the text in my webpage but lot of other "web data" :

connecting... HTTP/1.1 200 OK Date: Mon, 17 Jul 2017 07:46:35 GMT Server: Apache/2.2 Last-Modified: Mon, 17 Jul 2017 07:01:36 GMT ETag: "5-5547df842b0c4" Accept-Ranges: bytes Content-Length: 5 Vary: Accept-Encoding Connection: close Content-Type: text/plain Via: 1.1 alproxy

sapa0

I've made something like this... which doesn't work

if (client.available()) {
    char c = client.read();
    Serial.write(c);
    
    if ((c=="s") and (w==0)) {
        w=1;
}
    else {
        w=0; }
     
    if ((c=="a") and (w==1)) {
        w=2;
}
    else {
        w=0; }
      
    if ((c=="p") and (w==2)) {
          w=3;
}
    else {
          w=0; } 
      
    if ((c=="a") and (w==3))  {
          Serial.print ("ok");
          w=0;
          client.stop(); } }

Is there an easy way to do that ?

Big thanks for your help and sorry for my French...glish !

Martin