SearchResults

Phone Numbers

SearchResults.PhoneNumbers History

Hide minor edits - Show changes to output

June 27, 2009, at 04:56 PM by 67.160.86.122 -
Added line 35:
SerachResults can be modified to perform looser searches to find more numbers,but some of these can slow your searches down. It is our recommendation that if you can't find phone numbers you're looking for, you introduce *s into your search criteria (searching for *123-4567 if you're not sure of the area code) rather than hard code *s into SearchResults search scripts, which would slow down all searches.
June 27, 2009, at 04:49 PM by 67.160.86.122 -
Changed lines 24-25 from:
To achieve this, we can use the following 4 search requests on every search in a Phone table:
to:
To achieve this, we use the following 4 search requests on every search in a Phone table:
June 27, 2009, at 04:48 PM by 67.160.86.122 -
Added lines 32-34:

%center% http://www.seedcode.com/rootimages/stikipad/sr/phoneresults.png

June 27, 2009, at 04:45 PM by 67.160.86.122 -
Changed lines 9-16 from:
503/123-4567
503-123-4567
503.123.4567
123-4567
123.4567

[The following I consider to be invalid: 503.123-4567,  5031234567,  503-1235678 ]
to:
->503/123-4567
->503-123-4567
->503.123.4567
->123-4567
->123.4567

[The following we consider to be invalid: 503.123-4567,  5031234567,  503-1235678 ]
Changed lines 18-22 from:
A  123-4567
B  123.4567
C  503-123-4567
D  503.123.4567
to:

->
A  123-4567
->B  123.4567
->C  503-123-4567
->D  503.123.4567
Changed lines 25-30 from:
1. The original string
2. If the user entered format A or C, substitute . for -
3. If the user entered format B or D, substitute - for .
4. If the user entered a 10 digit phone (in any type of format), search for just the last 8 digits of what they enter (which includes either the . or -)

In this way, we get these results, with or without the area code.
to:

->
1. The original string
->2. If the user entered format A or C, substitute . for -
->3. If the user entered format B or D, substitute - for .
->4. If the user entered a 10 digit phone (in any type of format), search for just the last 8 digits of what they enter (which includes either the . or -)

In this way, we get these results, with or without the area code:
June 27, 2009, at 04:44 PM by 67.160.86.122 -
June 27, 2009, at 04:44 PM by 67.160.86.122 -
Changed line 8 from:
\\(503)123-4567
to:
->(503)123-4567
June 27, 2009, at 04:44 PM by 67.160.86.122 -
Changed line 8 from:
//(503)123-4567
to:
\\(503)123-4567
June 27, 2009, at 04:43 PM by 67.160.86.122 -
Changed line 8 from:
(503)123-4567
to:
//(503)123-4567
June 27, 2009, at 04:43 PM by 67.160.86.122 -
Changed lines 3-29 from:
to:
(SearchResults does some work with international phone number formats, but most of the tricky stuff concerns US numbers, which we'll discuss here.)

Let's assume that the customer has the following valid phone formats:

->(503) 123-4556
(503)123-4567
503/123-4567
503-123-4567
503.123.4567
123-4567
123.4567

[The following I consider to be invalid: 503.123-4567,  5031234567,  503-1235678 ]

The user will most likely enter this into the search field:
A  123-4567
B  123.4567
C  503-123-4567
D  503.123.4567

To achieve this, we can use the following 4 search requests on every search in a Phone table:
1. The original string
2. If the user entered format A or C, substitute . for -
3. If the user entered format B or D, substitute - for .
4. If the user entered a 10 digit phone (in any type of format), search for just the last 8 digits of what they enter (which includes either the . or -)

In this way, we get these results, with or without the area code.
June 27, 2009, at 04:38 PM by 67.160.86.122 -
Added lines 1-3:
!!How does SearchResults look for phone numbers?

(855) SEEDCODE
[email protected]
Follow us: