Parsing a part of a string of unknown length

PaulS:

com.indexOf("AVRCP_MEDIA TITLE:") + 2

This will move the pointer to extract from to the R. Is that really what you want? Or, are you trying to move the pointer two places past the end of the string?

I did this to eliminate the space in from of the string. I was getting " Captain" without it there. With it there I am getting "Captain". I did a LOT of fooling around with this, so this is just what got me closer to the result I was looking for.

I am trying to get the string between the "AVRCP_MEDIA TITLE:" and a new line ("\n"). That is the goal I'm after, and when I figure that out I can adapt the process for Artist, Album, etc. Thanks Paul.