Are you talking about the case where someone replies to a message and the reply message includes the text of the original message? Are you trying to separate out the text of the original message?
If that's what you're trying to do, the simple answer is that there's no defined way to do that. You're stuck with heuristics, trying to guess which parts of the text are the original message and which parts are the reply.
If you're talking about conversation "threads" that relate one message to another, see the link in the comment above.