File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Oracle/OAS and the fly likes substr in oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "substr in oracle" Watch "substr in oracle" New topic

substr in oracle

Vallaru smitha
Ranch Hand

Joined: Aug 19, 2008
Posts: 87


Can anyone please help to extract yahoo from above string.

Fatih Keles
Ranch Hand

Joined: Sep 01, 2005
Posts: 182
You can use a combination of substr and instr. Something like this.

But you may need to improve to handle repeating '.'
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Note that Oracle supports regular expressions (REGEXP_LIKE), so if you can come up with a regular expression to extract that part, you'll probably be able to use it with Oracle.

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: substr in oracle
It's not a secret anymore!