Help on reading serial data

In my case, I need to get only the "mx" and "my" values, but the serial sends everything altogether.

The "serial" doesn't send anything. The camera does. It sends a stream of characters that presumably mean something to the receiver.

How are you reading/capturing that data now? The answer to that has a lot to do with how you then parse the data. If you are doing it right, storing the data in a char array, the strtok() and atoi() or atof() functions might be worth looking into.