Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle For Fun
"Niall Litchfield" <niall.litchfield_at_dial.pipex.com> wrote
> I'd format this better but couldn't resist a solution with
> only 5 lines in user source...
>
> create or replace function is_phone(phone# in varchar2) return boolean
> is
> begin
> return owa_pattern.MATCH(phone#,'^[0-9]{3}-[0-9]{3}-[0-9]{4}$');
> END;
> /
>
Dammit Niall. You could have won by putting the IS on the first line and making it a 4 line solution.
;-)
-- BillyReceived on Thu Jan 29 2004 - 23:19:56 CST