Help with regular expressions

Hello,

I want to search all my site’s html files for the example URL below:

www.example.ca/ (anything could be after the forward slash “/”)

If some results have “eng” or “fra” immediately proceeding the domain (i.e. below) then I don’t want those URLs to be included in the results:

www.example.ca/eng/
www.example.ca/fra/

How can this be done using regular expressions?

Thanks

this might/should do it:

if( preg_match("/www\\.example\\.ca/(?!(eng/|fra/))/i", $string)) {
   // match
}

one correction: slashes need escaping, so:

if( preg_match("/www\\.example\\.ca\\/(?!eng\\/|fra\\/)/i", $string)) { 
   echo '<p>match</p>';
} else {
	echo '<p>no match</p>';
}