Question in Char Array

i’m using gsm lib and i want to separate the content of smsbuffer. ex Hello World then i will disregard the Hello and i will only get the World and store in Another byte/char array. tnx

look at strtok()

i used arduino lib

Regexp.h

MatchState ms;
  char * str = smsbuffer;
  ms.Target (str);
  
  unsigned int index = 0;
  char buf [100];
  
  while (true)
  {
  char result = ms.Match ("(%a+)" "(%-?%d+)", index);
  
   if (result == REGEXP_MATCHED){
     for (int j = 0; j < ms.level; j++);
     gsm.WritePhoneNumber(result[j],(%-?%d+);
     index = ms.MatchStart + ms.MatchLength;
   }
   else 
     break;
  }
}

can you help how to correct this one… tnx

There is a semicolon to much in the for statement:

for (int j = 0; j < ms.level; j++);

should be

for (int j = 0; j < ms.level; j++)

I think the compiler is complaining about this because with the extra semi colon, j

will not be defined on the next line.

Also the gsm.WritePhoneNumber looks wrong, what is the second argument ?