Re: SUBSTR & INSTR

From: Mtek <mtek_at_mtekusa.com>
Date: Mon, 16 Jun 2008 10:25:13 -0700 (PDT)
Message-ID: <1ec18612-62cf-4159-a30f-a94778eecfb2@27g2000hsf.googlegroups.com>


On Jun 16, 12:01 pm, joel garry <joel-ga..._at_home.com> wrote:
> On Jun 16, 9:48 am, Mtek <m..._at_mtekusa.com> wrote:
>
>
>
> > Hi,
>
> > I'm looking to parse an email. Say I have an email like this:
>
> > johnjo..._at_gmail.abc.def.ghi.com
>
> > I basically want johnjo..._at_gmail.abc.def.ghi in one variable and
> > the .com in the other.
>
> > If the email is this:
>
> > jjo..._at_amail.co
>
> > The same, I basically want jjo..._at_amail.co in one variable and
> > the .com in the other.
>
> > I know I have to use SUBSTR & INSTR, but the problem is that I do not
> > know how many periods may be in the email address.....
>
> > Any takers for some help??
>
> > Thanks!
>
> > John
>
> Can you not just check whatever is after the last period and decide
> then? There are only so many domains in the world. See the docs on
> instr about how to search backwards from the end of the string.
>
> But I must say, one of my domains ends with .to and does not have
> a .com, so I guess I'm thankful you can't spam me! :-)
>
> jg
> --
> @home.com is bogus.
> Sorry, not drunk enough: http://www.signonsandiego.com/uniontrib/20080614/news_1b14lerach.html

Thanks a bunch. Was unaware that Oracle offered a reverse INSTR lookup..... Received on Mon Jun 16 2008 - 12:25:13 CDT

Original text of this message