[kwlug-disc] Help!

Joe Wennechuk youcanreachmehere at hotmail.com
Wed Dec 31 08:42:15 EST 2014


Hello All,
Slightly off topic, but I know you guys can help. I have applied for a job, and they have asked me to write a java class that searches html from websites for links. I am using this regex ...(Pattern pattern = Pattern.compile("<a[^>]*>(.*?)</a>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);) to find them but based on the constraints I don't think I'm doing it right, as I am not finding all of the links. Here are the constraints.. Can anyone help??
Implementation constrains:   * For simplification assume that the link is defined as '<[whitespace]a[whitespace]' or '<[whitespace]A[whitespace]'.      ('<a ', '< a h', '<A >', '<a	attr=' are all valid links) 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20141231/97f8d9c8/attachment.htm>


More information about the kwlug-disc mailing list