in reply to How to find the Postion of String

Have a look at CPAN Modules HTML::LinkExtor or HTML::LinkExtractor.

pelagic