• Post Reply Bookmark Topic Watch Topic
  • New Topic

regular expression help  RSS feed

 
Erik Stagg
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have an assignment that i have to read the links in this web page https://www.cs.drexel.edu/~kschmidt/CS265/Assignments/WebCrawler-Java/sample.html

but i cant figure out the regular expression that matches all "or any" of them here is my code (sry code tags werent working)



this assignment is due in two hours! gunna fail this class!
 
Erik Stagg
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
using unix btw
 
Aditya Jha
Ranch Hand
Posts: 227
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, which URLs are you able to capture and which you can't?

I can provide the solution directly, but since it's your assignment, it would be a lot better if you come up with your own solution. If you have troubles, ranchers can help you fix it.
 
Erik Stagg
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that makes sence... i was able to get all of the except the first one... i think its becsuse of the tab character.

but submission for this assignment has closed. thanks neway for replying
 
Aditya Jha
Ranch Hand
Posts: 227
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use "\\s" to match white-spaces like tab characters etc.

I have another post on a similar topic. You may find it interesting.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!