How to get substrings from char pointer array

pravas:
I generally use strstr() function:
char buffer[]="+CBC: 0,99,4190" ; // this is a return string by GSM modem 0,charge level, millivolt
char *ptr; //temp pointer variable for pointer artihmetic
char *fieldPtr; //temp pointer variable for pointer artihmetic
:
:
:
:
ptr=strstr(buffer,"+CBC:"); // if substring found in buffer it return address ofstart character of matched string
// if not matched it returned NULL
if(ptr!=NULL)
{
ptr=strstr(ptr,",");
Serial.println(ptr); // will print :",99,4190"
// you can use pointer arithmetic to get the field
while(ptr!=NULL)
{
ptr++;
fieldPtr=ptr;
ptr=strstr(ptr,",");
*ptr='\0';
Serial.println(fieldPtr);
}
}
--------Output---------------------------------
,99,4190
99
4190

pravas - Thanks.
This looks like the kind of thing I'm trying to do but for a web page rather than GPS.
I think some experimenting over the weekend will see if I understand what you are saying.

Albert.