File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

substr in oracle

Vallaru smitha
Ranch Hand

Joined: Aug 19, 2008
Posts: 87

Hi,

xyz@yahoo.com

Can anyone please help to extract yahoo from above string.

Thanks
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é
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

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: http://aspose.com/file-tools
 
subject: substr in oracle