I want to match all strings ending in \".htm\" unless it ends in \"foo.htm\". I\'m generally decent with regular expressions, but negative lookaheads have me stumped. Why
The problem is pretty simple really. This will do it:
/^(?!.*foo\.htm$).*\.htm$/i