getting content of string between two quotes

G

gangsterss

Hi All...
I am trying to get the content that is in between two href tags of a
string. And after i get that content, i will need to process it further
on. But how do i get only the content as shown below..

<a href="/detail.html?detailID=56141">

i only want "/detail.html?detailID=56141". Please help !!!...

thanks,
 
L

Luc The Perverse

gangsterss said:
Hi All...
I am trying to get the content that is in between two href tags of a
string. And after i get that content, i will need to process it further
on. But how do i get only the content as shown below..

<a href="/detail.html?detailID=56141">

i only want "/detail.html?detailID=56141". Please help !!!...

thanks,

Look at the documentation on the java string class

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html

And remember that to get a string of a string you need to escape, like this.

String quotation = "\"";

This stuff should be fairly trivial.

If you have some code, and it is not working, feel free to post it. But in
general, people in this NG are not going to write your code for you.
 
B

Boris Werner

gangsterss said:
Hi All...
I am trying to get the content that is in between two href tags of a
string. And after i get that content, i will need to process it further
on. But how do i get only the content as shown below..

<a href="/detail.html?detailID=56141">

i only want "/detail.html?detailID=56141". Please help !!!...

thanks,
Hi!

Have a look at this:
http://www.devarticles.com/c/a/Java/Crawling-the-Web-with-Java/11/

hope this helps
Boris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top