js regex to find string but not another

JavaScript
^(?!.*details\.cfm).*selector=size.*$

Source

Also in JavaScript: