Changeset 768
- Timestamp:
- 01/17/07 13:32:00
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qSEOptimizer/trunk/skins/qSEOptimizer/statistics.js.dtml
r767 r768 45 45 if (len != 0) { 46 46 data = data // replace all non-word character with space 47 .replace(/[^a-zA-Z0-9\-\' ]+/g, ' ')47 .replace(/[^a-zA-Z0-9\-\'\u2019\"\`]+/g, ' ') 48 48 // replace "-" and "'" symbols if it create groups event inside of token 49 .replace(/[\-\' ]{2,}/g, ' ')49 .replace(/[\-\'\u2019\"\`]{2,}/g, ' ') 50 50 // replace all non-word characters and "-", "'" if it stay at word edge 51 .replace(/(?:^|\s+)[^a-zA-Z0-9]+|[^a-zA-Z0-9]+(?:\s+|$)/g, ' '); 52 var data_list = data.strip().split(/[^a-zA-Z0-9\-\']+/); 51 .replace(/(?:^|\s+)[^a-zA-Z0-9]+|[^a-zA-Z0-9]+(?:\s+|$)/g, ' ') 52 // strip whitespaces 53 .replace(/^\s*(.*?)\s*$/, '$1'); 54 var data_list = data.split(/[^a-zA-Z0-9\-\'\u2019\"\`]+/); 53 55 for (var i=0; word=data_list[i]; i++) { 54 56 stop += stop_dict[word.toLowerCase()] ? 1:0;
