Extracting IP address from a character array returned by ESP8266 module

Please be aware that so far the code just sets everything up and connects to the wifi network, gaining an IP address and displaying that.
The actual program loop is empty (I have the energy monitor working for local display in a different sketch but have been trying to get it wireless web enabled so working on that part before importing that code as well.

#include <AltSoftSerial.h>
#include "EmonLib.h" 
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

//config data - all constants 
const byte halfwaves=20;
const int timeout=2000;
const int baudrate=9600;
const byte voltspin=0, pvpin=1, mainspin=2, heaterpin=3;

//calibration data for each input. Accounts for variations in CT outputs and AC adaptor output
const float voltcal=228.00;
const float ipvcal=59.50;
const float imainscal=59.50;
const float iheatercal=54.50;
const float phaseshift=1.50;

//wifi network data
const char ssid[] = "mySSIDhere";
const char pwd[] = "mypassword";

//ip address and GET prefix for thingspeak
const char ip[] = "184.106.153.149";                    
const char GET[] = "GET /update?key=mythingspeakkey";

// global variables for voltage, current and power for each input plus calculated use
float vpv, ipv, qpv;
float vmains, imains, qmains;
float vheater, iheater, qheater;
float housetotal;

//wifi in/out strings
char incoming[100]; 
char clientip[16];

//Objects
EnergyMonitor emonpv;           // Create an instance of energy monitor for PV
EnergyMonitor emonmains;      // Create an instance of energy monitor for mains import/export
EnergyMonitor emonheater;     // Create an instance of energy monitor for immersion heater diversion

AltSoftSerial wifiserial;             // Start up a software serial port on D8 and D9 for ESP module comms

LiquidCrystal_I2C lcd(0x3f, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address and data

void setup() {
  
  Serial.begin(baudrate );
  wifiserial.begin(baudrate );
  lcd.begin(20,4);                    // initialize the lcd for 20 chars 4 lines, turn on backlight

  wifisend("ATE0",100);           // Check comms with ESP module and turn off echo to save array space
  wifireceive();
  if (strstr(incoming,"OK"))
  {
    Serial.println(F("Response received from ESP8266"));
    lcdtext(0,0,"Found ESP8266");
    connecttowifi();                  // Connect module to wifi network
  } 
  else {
    Serial.println(F("No response received from ESP8266")); 
    lcdtext(0,0,"Can't find ESP8266");
  } 
}

void loop() 
{
}

bool connecttowifi()
{
  char value[25];
  char tag[10];
  char cmd[50] ="AT+CWJAP=\"";
  Serial.println(F("Connecting to wifi"));
  lcdtext(0,0," Connecting to wifi");  
  strcat (cmd,ssid);
  strcat (cmd,"\",\"");
  strcat (cmd,pwd);
  strcat (cmd,"\"");
  wifisend(cmd,0);                                           //send command to connect to local wifi network
  
  for(int counter = 0; counter< 20; counter++) //loop to allow connection time of module 
  {                                                                 //and basic progress meter on lcd
    lcdtext(counter,1,".");
    delay(500);
  }
  wifireceive(); 
  if (strstr(incoming,"OK")) {
    Serial.println(F("Connected to Access Point"));
    lcdtext(0,1," Wifi connected OK  "); 
    wifisend("AT+CIFSR",500);                          //send command to display station IP and MAC address
    wifireceive();
    Serial.println(incoming);
    strcpy(tag,"STAIP");
    scantext(tag,value);                                    //extract IP address from received data
    Serial.print(F("IP address = ")); Serial.println(value);
    lcdtext(0,3,"IP = ");
    lcdtext(5,3,value);
    return true;
  } 
  else {
    Serial.println(F("Could not connect to Access Point")); 
    lcdtext(0,1,"Wifi connect failed ");
    return false; 
  }
}

void lcdtext(int column, int row, const char text[] )
{
  lcd.setCursor(column,row);
  lcd.print(text);
}

void wifisend (const char sendthis[], int waittime)
{
  Serial.print(F("Sending: "));
  Serial.println(sendthis);
  wifiserial.println(sendthis);
  delay(waittime);
}

void wifireceive()
{
  byte index=0;
  char iochar=-1;
  while (wifiserial.available()) {
    iochar=wifiserial.read();
    incoming[index]=iochar;
    index++;
    incoming[index]='\0';      
  }   
}

void scantext(char* tag, char* value)
{
  char* label;
  char* firstquote;
  char* secondquote;
  char lengthofvalue;
  label=strstr(incoming,tag);
  if (label)
  {
    firstquote=strstr(label+1,"\"");   
    secondquote=strstr(firstquote+1,"\"");
    lengthofvalue=secondquote-firstquote-1;
    strncpy(value,firstquote+1,lengthofvalue);
    value[lengthofvalue]='\0';
   }
  else
  {
    strcpy(value,"NOT FOUND");
  }
}

The result of this successfully completing are this displayed in the serial monitor
Sending: ATE0
Response received from ESP8266
Connecting to wifi
Sending: AT+CWJAP="mySSIDhere","mypassword"
Connected to Access Point
Sending: AT+CIFSR
+CIFSR:STAIP,"192.168.1.117"
+CIFSR:STAMAC,"5c:cf:7f:65:fa:00"
OK
IP address = 192.168.1.117

and this on the LCD screen

Connecting to wifi
Wifi connected OK
IP = 192.168.1.117