[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
inverse search
From: |
Kevin Buchs |
Subject: |
inverse search |
Date: |
Tue, 14 Mar 2017 10:40:52 -0500 |
I have often found myself wishing to search large files for the next line
which doesn't match a regexp. Finally, today I wrote a function for it.
Here is my humble contribution.
(defun inv-search (regexpr)
"search down for the first line not matching a regular expression.
Note the
regexp will automatically be anchored to the beginning of the line. "
(interactive "MRegexp: " regexpr)
(while (looking-at regexpr)
(forward-line 1)) )
Kevin Buchs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- inverse search,
Kevin Buchs <=