Re: [Clip] Re: [NTB] Remove lines with keywords?
- Hi Billy,
The H=Clipname line is long; remove hard line breaks if there are
any - you can use Modify | Lines | Join Lines after selecting the
line. See note about adding your list of strings to search for
inside Clip (%StringList%). If the Clip gets too messed up for
you to fix or you don't understand how to add it, download the
nnnLines Library from below. To edit a Clip right click over it
and choose Edit Clip...
<--- Copy below this line --->
H=DeleteLine if it contains... Deletes all lines in document if they contain the string you specify.
; Clip is also in: http://www.notetab.net/zip/nnnlines.zip
; eMailed on 08-02-2004, email@example.com, Jody
; notetab.net, clean-funnies.com, fookes.us, sojourner.us
; Fookes Software Home
^!SetHintInfo Removing domains...
; Insert list of comma separated words after
; SetArray %StringList%= (Remove bad,tech)
^!Set %Index%=0; %DeleteCount%=0
^!If ^%Index% > ^%Count% Stats
^!Find "^%StringList^%Index%%" SITC
^!Toolbar Clear All
; long line follows, remove any hard line breaks if any - Join Lines ;)
^!SetWizardTitle Get more Libraries & Clips at the NoteTabbers Assistant Page: http://www.notetab.net
^!Info [L]Number of lines deleted: ^%DeleteCount%^p^p^%DeleteList%
<--- Copy above this line --->
<--- Right click over a Library --->
<--- Choose: Add from Clipboard --->
>This is my first post. I hope it's acceptable. My questionHappy Clip'n!
>involves whether NoteTab has the ability to remove lines from a
>text file that contain a certain keyword, or string.
>Anyway, here is a brief sample of what my Hosts file looks like:
> 127.0.0.1 backupdvd.info
> 127.0.0.1 backwebtechnologies.rsc01.net
> 127.0.0.1 bad-credits.net
> 127.0.0.1 bad.a6.squally7845tabs.us
> 127.0.0.1 badboss.tv
> 127.0.0.1 badcredithistorycreditcard.com
> 127.0.0.1 baden24.ivwbox.de
> 127.0.0.1 badlands.112.2o7.net
> There's thousands of these "hosts", or websites, in my Hosts
> file. What I need NoteTab to do is remove all host entries that
> contain a certain word, or "string" that I specify, because I
> have another filter method based on keywords, and I want to
> slim my huge Hosts file down, for speed of access purposes. So
> far I have not been able to figure out how to do it with my
> NoteTab, but I feel N.T. can do it. For instance, if I specify
> that NoteTab remove all entries that contain the word "bad"
> from the list above, NoteTab would delete or separate from the
> list 6 of the 8 hosts, starting at- 127.0.0.1 bad-credits.net.
> There will be around 200 of these keywords I will use to pare
> down my very large Hosts file. If I could specify all 200
> strings in the same operation, that would be even better, but
> I'll settle for one at a time. Is any of this possible with
> NoteTab? And if so, how? Thanks, Billy