[TxMt] Finding lines that DON'T match

Rob McBroom textmate at skurfer.com
Mon Dec 11 15:53:14 UTC 2006


On Dec 11, 2006, at 9:41 AM, Tobias Jung wrote:

> Hallo,
>
> I've got a file with a LOT of lines that match the following  
> regular expression:
> ([0-9]+);([^;]+);([0-9]+);([0-9.]+);\n
>
> But within that file there are a few lines that don't match (in  
> various ways) and I've got to find those lines. Is there a way to  
> tell TextMate:  "Find everything that DOESN'T match the given  
> regular expression"?

If this is a one time thing, you could use Filter Through Command…  
(⌥⌘R) and run the file through `egrep -v [pattern]`. If you're  
tying to match this on a more permanent basis (in a Language Grammar  
or something) then I'm not sure off the top of my head, but I'll bet  
the answer is on its way from someone else.

---
Rob McBroom
<http://www.skurfer.com/>
I didn't "switch" to Apple... my OS did.






More information about the textmate mailing list