find () or not ()
Moderators: AmigoJack, bbadmin, helios, MudGuard
find () or not ()
I need find all lines that not contain "()" or not contain "abc"
-
ben_josephs
- Posts: 2464
- Joined: Sun Mar 02, 2003 9:22 pm
I think you're saying that you want to find lines that do not contain the 2-character string () or do not contain the 3-character string abc. That is the same as lines that do not contain both () and abc.
Or do you want to find lines that do not contain () and do not contain abc? That is the same as lines that do not contain either () or abc.
In TextPad you can't directly search for text not matching an arbitrary regular expression. But you can bookmark lines not containing matching text in two steps: first bookmark the lines that do contain matching text; then invert the bokmarks.
To bookmark the lines that contain both () and abc:
Then Search | Invert All Bookmarks.
Both the regular expressions above assume you are using Posix regular expression syntax:
Or do you want to find lines that do not contain () and do not contain abc? That is the same as lines that do not contain either () or abc.
In TextPad you can't directly search for text not matching an arbitrary regular expression. But you can bookmark lines not containing matching text in two steps: first bookmark the lines that do contain matching text; then invert the bokmarks.
To bookmark the lines that contain both () and abc:
To bookmark the lines that contain either () or abc:Find what: \(\).*abc|abc.*\(\)
[X] Regular expression
Mark All
To invert the bokmarks:Find what: \(\)|abc
[X] Regular expression
Mark All
Then Search | Invert All Bookmarks.
Both the regular expressions above assume you are using Posix regular expression syntax:
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax