how do I parse Serial Data only when preceded by....

I would like to analyze incoming serial data looking for...

If "A" comes in then look at the next 8 numbers

do something to first number,
do something to second number,
etc.

If "B" comes in then look at the next 8 numbers

do something to first number,
do something to second number,
etc.
When there is a line break exit this function and start looking for A's and B's again.

I know this isn't that complex, but I am having a lot of trouble figuring it out. My background is in max-msp. Any help would be appreciated.
ChristopherO

if (Serial.available() >=10) {  //A + 8 numbers + \n

switch(Serial.read()) {
    case 'A': {
        //do something to first number...
        //do something to second number... 
        //etc...
        if (Serial.read() == '\n') {
            //things are great, accept the command
            }
        break;
        }
    case 'B': {
        //do something to first number...
        //do something to second number... 
        //etc...
        if (Serial.read() == '\n') {
            //things are great, accept the command
            }
        break;
        }
}//end switch
}//ed if

Some tips: