I need a regular expression to do the following.
I have a variable called $base, that contain an url (http://www.mysite.com/)
I need a regular expression that will check in the list of link if the list contain $base + index or default ( it need to get all type of document example (inde.html, default.html, index.asp, index.aspx, etc.)
Thanks
I have this so far and looks like it's working. I'm using it in PERL
m/($base)(index.|default.)/
When I print the list it removes all the index.html, index.asp,....
Is that correct? or Is there a better way to do this.
Thank you..
Not quite sure what your question is, but if your solution passes all your tests, then I guess it's correct!
; )
I'm trying to remove self-referencing link from a list of links.
example if I'm looking at links from http://www.mysite.com/ and I found this link on the list http://www.mysite.com/index.html it's a self-referencing link, so I don't need and I can skip it.