Editing serial monitor content

Hi,

I just want to edit the content of the serial monitor, and I think I can't.

So, I want to initialize messages of the system with welcome, and the I write:

Initializing system ...

and doing the moving dots here works OK.

Now I want to print the moving dots and remove the, and write them again like many systems which shows you moving content as the system is initializing or calculating parameters.

So, my question is how to do that?

#include <SoftwareSerial.h>

char array[2]={};
char counter=0;
char dot='.';

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  Serial.println("Hello,");
  Serial.print("Initializing system ");
  
    for (byte k=0;k<=2;k++){
      Serial.print(".");
      delay(500);  
    }
    Serial.println();
    Serial.println("Test for loop");
    Serial.println();

for (byte j=0;j<=2;j++){
    for (byte i=0;i<=2;i++){
      array[counter]=dot;
      Serial.print(array[counter]);
      delay(500);
      counter++;
      }
    clearData();  }
}

void loop() {
  
  // put your main code here, to run repeatedly:
  //char s;
  String s;
  if (Serial.available()){
  //s=Serial.read();
  s=Serial.readString();
  Serial.print(s);
  
  Serial.print("\n");
    }    
  }


  void clearData()
{
  while(counter !=0)
  {   // This can be used for any array size, 
    array[counter--] = 0; //clear array for new data
  }
  return;
}

Regards,

I just want to edit the content of the serial monitor, and I think I can't.

You think correctly.

So, my question is how to do that?

Use a program that supports VT100 emulation, and send the appropriate control codes.