function formatTokenize( str ) {
	var content;
	var tokens;
	var match;
	var prev;

	tokens = [];
	prev = 0;
	match = RE.exec( str );
	while ( match ) {
		content = str.slice( prev, RE.lastIndex - match[ 0 ].length );
		if ( content.length ) {
			tokens.push( content );
		}
		// Check for an escaped percent sign `%%`...
		if ( match[ 6 ] === '%' ) {
			tokens.push( '%' );
		} else {
			tokens.push( parse( match ) );
		}
		prev = RE.lastIndex;
		match = RE.exec( str );
	}
	content = str.slice( prev );
	if ( content.length ) {
		tokens.push( content );
	}
	return tokens;
}
Tokenizes a string into an array of string parts and format identifier objects.

@param {string} str - input string
@returns {Array} tokens

@example
var tokens = formatTokenize( 'Hello %s!' );
// returns [ 'Hello ', {...}, '!' ]