/*

*/

if(typeof textHlpr === 'undefined'){
	var textHlpr = {};
}


textHlpr.getSearchWords = function(inStr){
	inStr = inStr.replace(/[^a-z|A-Z]/g, ' ');
	
	//console.log(inStr);
	//var getSearchWordsRE = /[^|\s]*[A-Z|a-z|\.\,]{3,}[$|\s]*/gi;
	var getSearchWordsRE = /[^|\s]*([A-Z][a-z]{2,}[$|\s]*)/g;
	var matches = {index:0};
	var wordArray = [], matchArray = [];

	while((matches = getSearchWordsRE.exec(inStr)) !== null)
	{
		matchArray.push(matches);
		wordArray.push(matches[0].replace(/\s/g,''));	
	}

	return	{
		matches : matchArray, 
		words : wordArray,
		text : inStr
	};
}
