1

how can use a regular expression to extract a links in a web page(suppose i get the html page as a text file) using java?

netha
  • 11
  • 1

2 Answers2

2

This previously posted question should help you

How to use regular expressions to parse HTML in Java?

Essentially you should really look at using a HTML parser

Community
  • 1
  • 1
irishbuzz
  • 2,420
  • 1
  • 19
  • 16
1

Agree that HTML parser will make your life easier if you can include it with your build - I've used Jericho HTML Parser for something similar in the past...

chrismh
  • 131
  • 4