split incoming serial stream into separate fields

Hi friends
i have the following problem:
i have an incoming serial stream from an external device.
the stream is the following format:
number1,number2,name,telnr,email, number1,number2,name,telnr,email, number1,number2,name,telnr,email, and so on

I need to capture this stream and split this into separate fields
int Number1
int Number2
string name
string telnr
string email

after the split I need to run my code and then read the next incoming stream of the 5 fields.
i was trying to do this with the if (Serial.available() > 0) char character = Serial.read() loop but i'm stuck in putting the data in the correct fields of different formats. (INT, STRING,) because i don't know the length of the strings beforehand...

any help is welcome.

Have a look at the parse example in Serial Input Basics

...R

The strok() function will allow you to split the stream of characters and put them in an array of C style strings (zero terminated arrays of chars)

Once in the array you can convert them to the required type for each data item. Personally I would put them in a struct holding mixed data types at that stage rather than in individual variables but that is up to you