| Author |
regex confusion.
|
ilteris kaplan
Ranch Hand
Joined: Jan 21, 2006
Posts: 38
|
|
Hello All, Basically I am reading an url and ideally looking for "/comments-all" string. This unfortunately didn't work at all. I tried a very simple "comments" string but it didn't work either. Here's the code below, I think I am missing very simple thing here.
|
 |
Stevi Deter
Ranch Hand
Joined: Mar 22, 2008
Posts: 265
|
|
ilteris, What behavior are you seeing that makes you think this isn't working? I ran your program (after finding the code for A2ZUrlReader.java, and found 6 matches when I passed in this page's url (http://www.coderanch.com/t/385301/java/java/regex-confusion) as the URL to be parsed. I changed the pattern in read(String) to "/comments-all" and had one hit. Both correspond to the content of this page before I added this comment. Looks like the code works - it correctly retrieves a page and parses the page content looking for matches. What are you expecting it to do?
|
There will always be people who are ahead of the curve, and people who are behind the curve. But knowledge moves the curve. --Bill James
|
 |
ilteris kaplan
Ranch Hand
Joined: Jan 21, 2006
Posts: 38
|
|
Hey Stevi, Thanks a lot for your time. I realized I am dumb once again. Never ends I guess it's working fine here. thanks again, ilteris
|
 |
Stevi Deter
Ranch Hand
Joined: Mar 22, 2008
Posts: 265
|
|
|
Sometimes you just need that second pair of eyes!
|
 |
 |
|
|
subject: regex confusion.
|
|
|