Made a library for mikroC PRO PIC for PIC18Fs. It searches for ith occurence of delimiter 1 and then extracts the data from this index to jth occurence of delimiter 2. In the below code the text after 2nd '\n' ("Your...) till 2nd occurence of '\r' from this position which is "...484537;" is extracted.
So, sub string "Your Google \r\nverification code is 484537;" is extracted.
Example usage:
Code C - [expand]
1
2
3
4
5
6
7
8
unsignedchar testData[]="AT+CMGR=156\r\r\n+CMGR: \"REC READ\",\"p4w4w274\",,\"2013/01/02 19:16:19+22\"\r\nYour Google \r\nverification code is 484537;\r\n";unsignedchar temp[160];void main(){
GSM_GPRS_Split(&temp,&testData,'\n',2,'\r',2);}
Edit: Updated file attached. Place the .mlk file in \mikroC PRO PIC\Defs folder and .mcl file in \mikroC PRO PIC\Uses\P18 folder