I'm trying to get this to work with perl's regex but can't seem to figure it out.. I want to grab any url that has ".website." in it, except ones that are like this (with "en" preceding ".website."
$linkhtml = 'http://en.search.website.com/?q=beach&' ;
This is an example of a url that I would want to be returned by the regex, while the one above is rejected
$linkhtml = ' http://exsample.website.com/?q=beach&' ;
Here is my attempt at it.. any advice on what I'm doing wrong is appreciated
$re2='(?<!en)'; # Any number of characters
$re4='(.*)'; # Any number of characters
$re6='(\.)'; # Any Single Character 4
$re7='(website)'; # Word 2
$re8='(\.)'; # Any Single Character 5
$re9='(.*)'; # Any number of characters
$re=$re4.$re2.$re6.$re7.$re8.$re9;
if ($linkhtml =~ /$re/)