Thanks Rob!
got it:
String pattern = "<a[^>]*?href\\s*=\\s*((\'|\")(.*?)(\'|\"))[^>]*?(?!/)>";
System.out.println(m.group(1) + "<-- -->"+ m.start() + "<-- -->" + ss);
output :
'google.com'<-- -->6<-- -->hello
link
will take those quotes out too..and the case when there are no quotes..will post back when done.
thanks..i did take the thought step by step..but did not write them down!..nice learning from you!