Mark Townsend wrote:
> Daniel Morgan wrote:
>
>> Frank van Bortel wrote:
>>
>>> <g> COuld you make that a regular? I'd like that.
>>
>>
>>
>> My pleasure. I can't remember if I've done this one before ... but in
>> the US telephone numbers with area code are always in the form
>> ###-###-####.
>>
>> Write a simple function that will return a Boolean (True/False) as to
>> whether something has the format of a valid telephone number with area
>> code. It must check for the following:
>>
>> Three integers between 0 and 9
>> Followed by a dash '-'
>> Followed by three integers between 0 and 9
>> Followed by a dash '-'
>> Followed by four integers
>> The length must be 12.
>>
>> Hint: When I run the following query:
>> select * from user_source where name = <function_name>;
>> it returns only 7 lines of code.
>>
>
> Can I use 10g Regexs ?
If you think you can do it better than with 9i features ... post your
code: I'm betting you can't. I'll compare what you do with my 9i
solution and report back the results.
--
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Wed Jan 28 2004 - 23:24:39 CST