|
03-13-2005, 11:04 PM | #1 |
Orange Mole
Join Date: Mar 2004
Posts: 48
|
Indexing of numbers
Is it possible to index only phone numbers as in:
###-###-#### or ###-#### or (###) ###-#### or ###.###.#### or ###.#### and not index other sets of numbers such as dates, times, dolar amounts, and misc. numbers? I am lost when it comes to regular expressions. |
03-15-2005, 10:29 AM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Perhaps modify the following line in robot_functions.php to insert words or telephone numbers:
Code:
// v.1.8.7 if (strlen($key) > SMALL_WORDS_SIZE and strlen($key) <= MAX_WORDS_SIZE and !isset($common_words[$key]) and ereg('^['.$phpdig_words_chars[PHPDIG_ENCODING].'#$]',$key)) // v.1.8.8 RC1 if (mb_strlen($key) > SMALL_WORDS_SIZE and mb_strlen($key) <= MAX_WORDS_SIZE and !isset($common_words[$key]))
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
03-16-2005, 09:37 AM | #3 |
Orange Mole
Join Date: Mar 2004
Posts: 48
|
Thanks. I don't know how to work with regular expressions nor how to add one to this line of code. SInce this sounds like a complex issue to deal with, how can I keep from indexing all numbers?
|
04-06-2005, 02:08 PM | #4 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Try the following and see if it avoids all numbers:
Code:
// v.1.8.7 if (!eregi("[0-9]",$key) and strlen($key) > SMALL_WORDS_SIZE and strlen($key) <= MAX_WORDS_SIZE and !isset($common_words[$key]) and ereg('^['.$phpdig_words_chars[PHPDIG_ENCODING].'#$]',$key)) // v.1.8.8 RC1 if (!mb_eregi("[0-9]",$key) and mb_strlen($key) > SMALL_WORDS_SIZE and mb_strlen($key) <= MAX_WORDS_SIZE and !isset($common_words[$key]))
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Include Numbers which occur in names | galacticvoyager | How-to Forum | 1 | 11-12-2005 02:45 PM |
fuzzy search on product numbers | indeh | How-to Forum | 0 | 10-13-2004 12:33 PM |
Numbers everywhere... | Nad | Troubleshooting | 10 | 07-14-2004 02:43 AM |
Numbers | BernhardG | Bug Tracker | 2 | 10-10-2003 05:20 AM |
phpdig not index numbers. | redlock | Troubleshooting | 6 | 10-06-2003 03:44 PM |