From: BrendanC Date: 2009-07-17T09:35:33+09:00 Subject: regexp exclusion search - find matches NOT ending with a string? I have the following text in a file: 1 a1.html 2 b.doc 3 c.xml 4 d.tiff 5 e.jpeg 6 f.html .... I need a regexp to match lines except those that end with ending in ".html" - iow - I want lines 2-5 above. I believe this may require a negative lookbehind match. I tried the following but Ruby (1.8) gives an undefined sequence error : $(?