I have the following NSString
:
productID = @\"com.sortitapps.themes.pink.book\";
At the end, \"book\" can be anything.... \"music\
Well, although this isn't a generic solution for finding characters, in your particular case you can "cheat" and save code by doing this:
[productID stringByDeletingPathExtension];
Essentially, I'm treating the name as a filename and removing the last (and only the last) extension using the NSString method for this purpose.