wood burning stoves 2.0*
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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 14687

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
It is sorta covered in the JavaRanch Style Guide.
subject: substr in oracle