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
Like Renesis mentioned, "lookbehind" is not supported in JavaScript, so maybe just use two regexps in combination:
!/foo\.htm$/i.test(teststring) && /\.htm$/i.test(teststring)