in reply to how to use regular expressions read some string from a htm file

I'd suggest using HTML::LinkExtor to extract the URLs from the <a /> elements and then throwing away the ones you don't want afterwards, however as you don't say how to distinguish between the ones you do want and the ones you don't I'm not going to guess and give you an example.

/J\