Storing string sent from phone ESP8266 01 via TCP client

Hi, I have seen some other people have a similar question but not have it adequately answered.
I am using a TCP client to send a string to my arduino. I can get it to be stored in a variable but I only want a specific part .

13:14:17.355 -> .
13:14:19.008 -> Msg Received = 0,CONNECT
13:14:19.008 ->
13:14:19.008 -> +IPD,0,10:MyPassword
13:14:21.202 -> .
As in I want the "MyPassword" portion to be stored so I use

void loop() {
  
    Serial.println(".");
  if(portOne.available()>0 && i==1){ //PassWord
    
    PW = readfromWifi();
    delay(200);
   
if(Serial.find("+IPD,0,10:")){
  Serial.println("gottem");/// to confirm it found it
   Serial.readBytesUntil('\r', MYData, 17); ///MYData is a char
   
}
}

it just doesn't work. its not printing "gottem" no matter what I put in the parenthesis except if I leave it as just "".

here is the "readfromWifi" function that I found to use

String  readfromWifi(){

  char arrayInMsg[100];
  String tempStr; 
  int count =0;
  while( portOne.available() > 0 ){
  
    arrayInMsg[count]= portOne.read();
    delay(50);
    // getout if you see CR or LF
    if (arrayInMsg[count] == "\n" or arrayInMsg[count] == "\r") break;
    count++;       
  }
  arrayInMsg[count] = '\0';                     // Null terminate finally
  tempStr = String (arrayInMsg);                // cast it to string
  tempStr.trim();                               // precaution
  Serial.print("Msg Received = ");
  Serial.println(tempStr);
  return tempStr;
}

any help would be appreciated. I am using Arduino uno, esp8266 01, mac os

try the WiFiEsp library

And do what with it?
But, that like only loads on to the esp8266 chip and I do not know how that that is helpful Ive just been using AT commands to communicate with it.

jlawley97:
And do what with it?
But, that like only loads on to the esp8266 chip and I do not know how that that is helpful Ive just been using AT commands to communicate with it.

it is a WiFi library for Arduino using AT commands over Serial

I can already connect to the internet and do all that
I just need to know how to save just the part of the string i need or rather save the entire string and just parse out the part i need.

jlawley97:
I can already connect to the internet and do all that
I just need to know how to save just the part of the string i need or rather save the entire string and just parse out the part i need.

according to your post, you don't have the string. "ts not printing "gottem" "

the +IPD can arrive for link 0,1,2,3,4. the length of data could be different then 10

Yeah but I can save the string to a variable then print that variable to see that I get the whole

0,CONNECT
+IPD,0,10:MyPassword

to be stored in a variable.

but what do the numbers(0,1,2,3,4) mean I understand the 10 being the length of the sent message

jlawley97:
Yeah but I can save the string to a variable then print that variable to see that I get the whole

0,CONNECT
+IPD,0,10:MyPassword

to be stored in a variable.

but what do the numbers(0,1,2,3,4) mean I understand the 10 being the length of the sent message

see the reference