Extracting substring of variable length

Does this help http://www.cplusplus.com/reference/string/string/find/