Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How Can I extract each part of a string ??

sunnycodeMay 17 2008 — edited May 19 2008
Dear Sir:

I have a string like following to connect to Oracle Database:
JDBC_URL= jdbc:oracle:thin:@localhost:1521:ABC
here,
I have Variables like:
driverClass="";
Hostname = "";
port = "";
SID="";
etc

I try to extract each part from this JDBC_URL,
then assign them to following variable separately:

driverClass="jdbc:oracle:thin";
Hostname = "localhost";
port = "1521";
SID="ABC";

Can some guru help give some good example and show how to do it??

Thanks and have a nice weekends.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2008
Added on May 17 2008
10 comments
1,933 views