Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ntb-clips · The NoteTab Clips List

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 22176 - 22205 of 23787   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#22176 From: "John Shotsky" <jshotsky@...>
Date: Fri Oct 21, 2011 10:32 am
Subject: RE: [Clip] Is GetDocListAll case sensitive?
shotsky1
Send Email Send Email
 
One easy way to do that would be to add a zero to the front of each line that
has a lower case letter following the
number, then sort the list, then remove the zero.

^!Replace "^(?=\d+\x20\p{Ll})" >> "0" ARSW
^!Toolbar Sort Ascending
^!Replace "^0" >> "" ARSW

1 avantveille
1 monstreuse
1 pas'de
1 precipiter
1 spectable
2 cho
2 leures
2 new-yorkaise
1 Colorado
2 7e
2 Gregorio
2 Maroc
50 Manfred
52 John

Regards,
John

From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of
Jean-François Colas
Sent: Friday, October 21, 2011 02:52
To: ntb-clips@yahoogroups.com
Subject: [Clip] Is GetDocListAll case sensitive?


Hi all,

First, a great thank for all the valuable infos about the Find dialog
box. For today, I have a problem with GetDocListAll, which seems not to
take account of case sensitivity...

I'm processing files whose lines are like below:
1 avantveille
1 monstreuse
1 Colorado
1 spectable
1 pas'de
1 precipiter
...
2 7e
2 Gregorio
2 new-yorkaise
2 Maroc
2 leures
2 cho
...
50 Manfred
52 John

(these are misspelled words against french vocabulary).

What I try to do is extract all lines where the "word" starts with a
lowercase character, in order to put all those lines at the top of the
file. I did the same with strings containing an hyphen and that works
fine. But here I cannot distinguish between lowercase and other strings.

Here is what I tried:

H="FiltreMinusculesOrd"
; filtrage des lignes d'un .ord commençant par une minuscule
; Le script les collecte et le place au début du fichier.
^!set %Minuscules%=^$GetDocListAll("(^ +\d+ +[[:lower:]].+$)";"$1\r\n")$
^!Replace "(^ +\d+ +[[:lower:]].+\R)" >> "" wtras
^!jump 1
^%minuscules%

GetDocListAll seems to return actually every line starting with a
letter, lowercase or uppercase, unless a make a mistake. On the
contrary, the ^!Replace command does what I expected.
I'm with NoteTab light 6.2.

If it would impossible to achive that with GetDocListAll, would another
way exist?

Thanks,
J.-F.



[Non-text portions of this message have been removed]

#22177 From: "flo.gehrke" <flo.gehrke@...>
Date: Fri Oct 21, 2011 2:34 pm
Subject: Re: Is GetDocListAll case sensitive?
flo.gehrke
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, Jean-François Colas <jfcolas@...> wrote:
>
> For today, I have a problem with GetDocListAll, which seems not
> to take account of case sensitivity...

The problem is in the Posix Character Class. Quite often I experience that
'[:upper:]' or '[:lower:]' is not processed correctly unless you add a '(?-i)'
modifier that prevents case from being ignored.

So try...

^$GetDocListAll("(?-i)^\x20+\d+\x20+[[:lower:]].+$";"$0\r\n")$

I wrote the spaces with hex '\x20' in order to make them more visible.

Regards,
Flo

#22178 From: Jean-François Colas <jfcolas@...>
Date: Fri Oct 21, 2011 4:50 pm
Subject: Re: [Clip] Re: Is GetDocListAll case sensitive?
jf_colas
Send Email Send Email
 
Hi Flo & all,

It works fine! Seems I missed the part of doc that mentions stuff like
(?-i).

J.-F.

Le 21/10/2011 16:34, flo.gehrke a écrit :
> --- In ntb-clips@yahoogroups.com, Jean-François Colas<jfcolas@...>  wrote:
>>
>> For today, I have a problem with GetDocListAll, which seems not
>> to take account of case sensitivity...
>
> The problem is in the Posix Character Class. Quite often I experience that
'[:upper:]' or '[:lower:]' is not processed correctly unless you add a '(?-i)'
modifier that prevents case from being ignored.
>
> So try...
>
> ^$GetDocListAll("(?-i)^\x20+\d+\x20+[[:lower:]].+$";"$0\r\n")$
>
> I wrote the spaces with hex '\x20' in order to make them more visible.
>
> Regards,
> Flo
>
>
>
>
> ------------------------------------
>
> Fookes Software: http://www.fookes.com/
> NoteTab website: http://www.notetab.com/
> NoteTab Discussion Lists: http://www.notetab.com/groups.php
>
> ***
> Yahoo! Groups Links
>
>
>

#22179 From: "joy8388608" <mycroftj@...>
Date: Mon Oct 24, 2011 5:05 pm
Subject: Re: [Clip] Setting up fields of a dialog box
joy8388608
Send Email Send Email
 
I set tabs from within a clip using this code that works fine...

; call with ^!FarClip "MySubs:SetTabs" 15;30;80
^!Delay 4
^!KeyBoardDelay 80
^!Keyboard Altdown #D# #P# #S# Altup #^&# &400 ENTER
^!Delay 4

I liked the idea here thought it would be more efficient to simulate Control V
instead of waiting for the tab settings to 'type' themselves in, but can't get
it to work! The Properties dialog displays and then it just sits there. I
thought I was copying this code closely enough but I guess not.  Do I need all
that activateApp and IfAppOpen code? Even if I do need it, it doesn't work. What
is wrong?

Thanks,
Joy

--- Sits there after displaying Properties dialog box ---

; call with ^!FarClip "MySubs:SetTabs" 15;30;80
^!SetClipboard ^&
^!Menu Document/Properties
^!ActivateApp
^!IfAppOpen "Current Document Properties" Next Else Skip_-2
^!FocusApp "Current Document Properties"
^!Keyboard Altdown #S# Altup
^!Keyboard CtrlDown #v# CtrlUp
^!Keyboard ENTER



>
> H="Sample S-R"
> ^!Set %SRTexts1%="Hello"
> ^!Set %SRTexts2%="Goodbye"
> ^!Menu Search/Replace
> ^!IfAppOpen "Find and Replace" Next Else Skip_-1
> ^!Clip "Load S-R"
> ;end of clip
>
> H="Load S-R"
> ;2006-12-04 by Sheri Pierce (originally from 2002)
> ^!ActivateApp
> ^!IfAppOpen "Find and Replace" Next Else Test4Find
> ^!FocusApp "Find and Replace"
> ^!Keyboard ALTDOWN #x# ALTUP #-#
> ^!SetClipboard ^%SRTexts1%
> ^!Keyboard AltDown #n# AltUp
> ^!Keyboard CtrlDown #v# CtrlUp
> ^!Keyboard ALTDOWN #x# ALTUP #+#
> ^!SetClipboard ^%SRTexts2%
> ^!Keyboard AltDown #p# AltUp
> ^!Keyboard CtrlDown #v# CtrlUp
> ^!Keyboard AltDown #c# AltUp #-#
> ^!Goto Finished
> :Test4Find
> ^!IfAppOpen "Find" Next Else Error
> ^!FocusApp "Find"
> ^!Keyboard ALTDOWN #x# ALTUP #-#
> ^!SetClipboard ^%SRTexts1%
> ^!Keyboard AltDown #n# AltUp
> ^!Keyboard CtrlDown #v# CtrlUp
> ^!Keyboard ALTDOWN #x# ALTUP #+#
> ^!Keyboard ALTDOWN #c# ALTUP #-#
> :Finished
> ^!Goto End
> :Error
> ^!Prompt Error - NoteTab's "Find" or "Find and Replace" dialog must be
> open when this clip is run.
> ;end of clip
>

#22180 From: "Sheri" <silvermoonwoman@...>
Date: Mon Oct 24, 2011 6:55 pm
Subject: Re: [Clip] Setting up fields of a dialog box
silvermoonwo...
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "joy8388608" <mycroftj@...> wrote:
>
> I set tabs from within a clip using this code that works fine...
>
> ; call with ^!FarClip "MySubs:SetTabs" 15;30;80
> ^!Delay 4
> ^!KeyBoardDelay 80
> ^!Keyboard Altdown #D# #P# #S# Altup #^&# &400 ENTER
> ^!Delay 4
>
> I liked the idea here thought it would be more efficient to
> simulate Control V instead of waiting for the tab settings
> to 'type' themselves in, but can't get it to work! The
> Properties dialog displays and then it just sits there. I
> thought I was copying this code closely enough but I guess
> not. Do I need all that activateApp and IfAppOpen code? Even
> if I do need it, it doesn't work. What is wrong?
>
> Thanks,
> Joy
>

Document Properties is a different kind of window than the Search dialogs.
Document Properties is modal, which means normal activity is suspended when it
is shown. The Search dialogs are modeless, which means they behave more
independently. You need the window to behave independently if you want to
activate, focus and paste to it using separate commands. But, by stuffing the
keyboard buffer in the Keyboard command that actually initiates the Document
Properties dialog, your older clip is able to input to the correct field. You
could try adding CtrlDown #v# CtrlUp for pasting the current clipboard content
there, but you will have to set the clipboard prior to using the keyboard
command. Possibly this would work:

^!SetClipboard ^&
^!Keyboard Altdown #D# #P# #S# Altup CtrlDown #v# CtrlUp ENTER

Regards,
Sheri

#22181 From: "joy8388608" <mycroftj@...>
Date: Mon Oct 24, 2011 10:36 pm
Subject: Re: Setting up fields of a dialog box
joy8388608
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
>
> --- In ntb-clips@yahoogroups.com, "joy8388608" <mycroftj@> wrote:
> >
> > I set tabs from within a clip using this code that works fine...
> >
> > ; call with ^!FarClip "MySubs:SetTabs" 15;30;80
> > ^!Delay 4
> > ^!KeyBoardDelay 80
> > ^!Keyboard Altdown #D# #P# #S# Altup #^&# &400 ENTER
> > ^!Delay 4
> >
> > I liked the idea here thought it would be more efficient to
> > simulate Control V instead of waiting for the tab settings
> > to 'type' themselves in, but can't get it to work! The
> > Properties dialog displays and then it just sits there. I
> > thought I was copying this code closely enough but I guess
> > not. Do I need all that activateApp and IfAppOpen code? Even
> > if I do need it, it doesn't work. What is wrong?
> >
> > Thanks,
> > Joy
> >
>
> Document Properties is a different kind of window than the Search dialogs.
Document Properties is modal, which means normal activity is suspended when it
is shown. The Search dialogs are modeless, which means they behave more
independently. You need the window to behave independently if you want to
activate, focus and paste to it using separate commands. But, by stuffing the
keyboard buffer in the Keyboard command that actually initiates the Document
Properties dialog, your older clip is able to input to the correct field. You
could try adding CtrlDown #v# CtrlUp for pasting the current clipboard content
there, but you will have to set the clipboard prior to using the keyboard
command. Possibly this would work:
>
> ^!SetClipboard ^&
> ^!Keyboard Altdown #D# #P# #S# Altup CtrlDown #v# CtrlUp ENTER
>
> Regards,
> Sheri
>


Ahhh. I didn't notice the Dialog box was modal. I found the following does work
but it needs the KeyBoardDelay or the Find dialog pops up as well as the
Document Properties and it doesn't do what it is supposed to do. I also saved
the clipboard so the subroutine (I call this routine) does not change it.

Thanks so much (once again) for your help.

Joy

^!Set %ST_OCB%=^$GetClipBoard$
^!SetClipboard ^&
^!KeyBoardDelay 100
^!Keyboard Altdown #D# #P# #S# Altup CtrlDown #v# CtrlUp ENTER
^!SetClipboard ^%ST_OCB%

#22182 From: Sheri <silvermoonwoman@...>
Date: Tue Oct 25, 2011 3:02 pm
Subject: Re: [Clip] Re: Setting up fields of a dialog box
silvermoonwo...
Send Email Send Email
 
On 10/24/2011 6:36 PM, joy8388608 wrote:
> Ahhh. I didn't notice the Dialog box was modal. I found the following does
work but it needs the KeyBoardDelay or the Find dialog pops up as well as the
Document Properties and it doesn't do what it is supposed to do. I also saved
the clipboard so the subroutine (I call this routine) does not change it.
>
> Thanks so much (once again) for your help.
>
> Joy
>
> ^!Set %ST_OCB%=^$GetClipBoard$
> ^!SetClipboard ^&
> ^!KeyBoardDelay 100
> ^!Keyboard Altdown #D# #P# #S# Altup CtrlDown #v# CtrlUp ENTER
> ^!SetClipboard ^%ST_OCB%
>

Glad you were able to get that working. FWIW you might prefer to use
Save and RestoreClipboard commands (which can accommodate with non-text
clipboard content if present).

Regard,
Sheri

#22183 From: Don <don@...>
Date: Sun Oct 30, 2011 7:24 am
Subject: Regular Expression Not Greedy
dpasseng
Send Email Send Email
 
I am trying to get from this:
   1 Okemos                      56      4    7    9   17   19   23   46
       4     Daniel Kroth               16:41.00
       7     Daniel Bartkowski          16:45.00
       9     David McKinley             16:50.00
       17    Beruk Scarlett             17:09.00
       19    Seph Dabrowski             17:15.00
       23    Michael Gorelik            17:25.00*
       46    Greg Parker                18:02.00*
       Total Time: 1:24:40      Average: 16:56.00      1-5 Split: 34
   2 Caledonia                   86      5    8   20   21   32   43   50


to this:
   1 Okemos|Caledonia                   86      5    8   20   21   32
43   50


My search pattern is:
"(s?)   +.*\r\n  2 "

But that only finds this:
       Total Time: 1:24:40      Average: 16:56.00      1-5 Split: 34
   2

I would expect it to get the first three spaces after Okemos to the
space before C in Caledonia.

#22184 From: "Sheri" <silvermoonwoman@...>
Date: Sun Oct 30, 2011 1:28 pm
Subject: Re: Regular Expression Not Greedy
silvermoonwo...
Send Email Send Email
 
> My search pattern is:
> "(s?)   +.*\r\n  2 "
>
> But that only finds this:
>       Total Time: 1:24:40      Average: 16:56.00      1-5 Split: 34
>   2
>
> I would expect it to get the first three spaces after Okemos to the
> space before C in Caledonia.
>

Your pattern begins with an optional literal "s"

#22185 From: Don <don@...>
Date: Sun Oct 30, 2011 1:46 pm
Subject: Re: [Clip] Re: Regular Expression Not Greedy
dpasseng
Send Email Send Email
 
Aha, ?s vs s? ... is that my mess up Sheri?

> Your pattern begins with an optional literal "s"
>

#22186 From: "Alex Plantema" <alex.plantema@...>
Date: Sun Oct 30, 2011 2:03 pm
Subject: Re: [Clip] Regular Expression Not Greedy
aplantema
Send Email Send Email
 
Op zondag 30 oktober 2011 08:24 schreef Don:

> I am trying to get from this:
>  1 Okemos                      56      4    7    9   17   19   23   46
>      4     Daniel Kroth               16:41.00
>      7     Daniel Bartkowski          16:45.00
>      9     David McKinley             16:50.00
>      17    Beruk Scarlett             17:09.00
>      19    Seph Dabrowski             17:15.00
>      23    Michael Gorelik            17:25.00*
>      46    Greg Parker                18:02.00*
>      Total Time: 1:24:40      Average: 16:56.00      1-5 Split: 34
>  2 Caledonia                   86      5    8   20   21   32   43   50
>
>
> to this:
>  1 Okemos|Caledonia                   86      5    8   20   21   32
> 43   50
>
>
> My search pattern is:
> "(s?)   +.*\r\n  2 "
>
> But that only finds this:
>      Total Time: 1:24:40      Average: 16:56.00      1-5 Split: 34
>  2
>
> I would expect it to get the first three spaces after Okemos to the
> space before C in Caledonia.

Your search pattern contains only one line break, try this in a clip:
^!Replace "( +\d+)+(\r\n +\d+ +.+ +\d\d:\d\d\.\d\d\*?)+\r\n.*Total Time.*\r\n
+\d+ " >> "|" WRSA

Alex.

#22187 From: "John Shotsky" <jshotsky@...>
Date: Thu Oct 20, 2011 12:47 pm
Subject: RE: [Clip] Setting up fields of a dialog box
shotsky1
Send Email Send Email
 
It sounds to me as if you need to build a series of clips to run on your text.
One clip for each type of change you want
made. When you run the 'library' of clips, it will process through your
document, and make all the changes you want.
Some examples of what you want would be helpful.

I do this even if I'm only processing one large document. WAY faster than doing
a whole document manually/interactively,
and much more precise as well.

Regards,
John

From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of
Jean-François Colas
Sent: Thursday, October 20, 2011 02:34
To: ntb-clips@yahoogroups.com
Subject: [Clip] Setting up fields of a dialog box


Hi all,

Though I'm using NoteTab for years now, I just started diving into the
Clip language. Mainly I do some Find/Replace operations with regex.

For a particular operation, is there any way to open the Replace dialog
box, set up the Find and Replace fields, but let us do the replacement
interactively?

Thanks,
J.-F.



[Non-text portions of this message have been removed]

#22188 From: "John Shotsky" <jshotsky@...>
Date: Tue Nov 1, 2011 2:57 am
Subject: RE: [Clip] Setting up fields of a dialog box
shotsky1
Send Email Send Email
 
Wow, I sent this message 11 days ago, and it is just now arriving, on the 31st!
Yahoo must be taking their email
delivery cues from the USPS.

Regards,
John
RecipeTools Web Site: http://recipetools.gotdns.com/


-----Original Message-----
From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of
John Shotsky
Sent: Thursday, October 20, 2011 05:48
To: ntb-clips@yahoogroups.com
Subject: RE: [Clip] Setting up fields of a dialog box

It sounds to me as if you need to build a series of clips to run on your text.
One clip for each type of change you want
made. When you run the 'library' of clips, it will process through your
document, and make all the changes you want.
Some examples of what you want would be helpful.

I do this even if I'm only processing one large document. WAY faster than doing
a whole document manually/interactively,
and much more precise as well.

Regards,
John

From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of
Jean-François Colas
Sent: Thursday, October 20, 2011 02:34
To: ntb-clips@yahoogroups.com
Subject: [Clip] Setting up fields of a dialog box


Hi all,

Though I'm using NoteTab for years now, I just started diving into the
Clip language. Mainly I do some Find/Replace operations with regex.

For a particular operation, is there any way to open the Replace dialog
box, set up the Find and Replace fields, but let us do the replacement
interactively?

Thanks,
J.-F.



[Non-text portions of this message have been removed]



------------------------------------

Fookes Software: http://www.fookes.com/
NoteTab website: http://www.notetab.com/
NoteTab Discussion Lists: http://www.notetab.com/groups.php

***
Yahoo! Groups Links

#22189 From: loro <tabbie@...>
Date: Tue Nov 1, 2011 3:04 am
Subject: RE: [Clip] Setting up fields of a dialog box
yastupidhoo
Send Email Send Email
 
John Shotsky wrote:
>Wow, I sent this message 11 days ago, and it is just now arriving,
>on the 31st! Yahoo must be taking their email
>delivery cues from the USPS.

I got it in a timely manner. They are just prioritizing. ;-)

Lotta

#22190 From: Al <acummingsus@...>
Date: Wed Nov 2, 2011 2:41 am
Subject: Re: [Clip] Setting up fields of a dialog box
acummingsus
Send Email Send Email
 
John Shotsky wrote:
> Wow, I sent this message 11 days ago, and it is just now arriving, on the
31st!

That would explain why I simultaneously got this one and another, a
match, dated the 20th.
>  Yahoo must be taking their email
> delivery cues from the USPS.
>

1. Too many mails to deliver arrived in too short of a time for their server

so their server had to backlog (store) messages for a later delivery

and to begin sequence of deliver (send out) the backlog as well as also
serving current arrivals

Then #1 happened again and again.

Yours got buried away in the backlog

PS I don't really know.  That was a guess.  | Alan.
> Regards,
> John
> RecipeTools Web Site: http://recipetools.gotdns.com/
>
>
> -----Original Message-----
> From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf
Of John Shotsky
> Sent: Thursday, October 20, 2011 05:48
> To: ntb-clips@yahoogroups.com
> Subject: RE: [Clip] Setting up fields of a dialog box
>
> It sounds to me as if you need to build a series of clips to run on your text.
One clip for each type of change you want
> made. When you run the 'library' of clips, it will process through your
document, and make all the changes you want.
> Some examples of what you want would be helpful.
>
> I do this even if I'm only processing one large document. WAY faster than
doing a whole document manually/interactively,
> and much more precise as well.
>
> Regards,
> John
>
> From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf
Of Jean-François Colas
> Sent: Thursday, October 20, 2011 02:34
> To: ntb-clips@yahoogroups.com
> Subject: [Clip] Setting up fields of a dialog box
>
>
> Hi all,
>
> Though I'm using NoteTab for years now, I just started diving into the
> Clip language. Mainly I do some Find/Replace operations with regex.
>
>
<snip>

#22191 From: "m_frascinella" <mfrascinella@...>
Date: Thu Nov 3, 2011 4:35 pm
Subject: deleting duplicate lines
m_frascinella
Send Email Send Email
 
Hi,

I searched the archive and couldn't find anything I can directly use.

I have a clip that extracts lines you specify (tag names) from a Framemaker MIF
file, writes them to a file, and sorts them. The result is sometimes hundreds of
duplicate tag names.

NoteTab does not seem to have a menu command or clip command to remove duplicate
lines, so I would like to know if someone could explain how to do that.

Here is my clip as it now stands:

^!Continue This clip copies all lines contain the text string you specify, and
puts them into a new file.
^!Set %Searchstring%=^?{Enter search string:}
^!SetListDelimiter ^P
^!Set %Lines%=^$GetDocMatchAll(^.*^%Searchstring%.*$)$

; open a new document and insert the found lines
^!Toolbar New Document
^!InsertText ^%Lines%

; remove all leading spaces before sorting
^!Replace "^[\s\t]+" >> "" AIRSW

; sort the lines in ascending order (a-z)
^!Menu modify/lines/sort/ascending
^!Select 0

; remove duplicate lines


Yours,

Michael F.
==========

#22192 From: "diodeom" <diomir@...>
Date: Thu Nov 3, 2011 5:14 pm
Subject: Re: deleting duplicate lines
diodeom
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "m_frascinella" <mfrascinella@...> wrote:
>
> ; remove duplicate lines
>

^!Replace "^(.+)\R\K(\1(\R|\Z))+" >> "" WARS

#22193 From: Don <don@...>
Date: Thu Nov 3, 2011 5:33 pm
Subject: Re: [Clip] deleting duplicate lines
dpasseng
Send Email Send Email
 
Well that depends, sort can be set to remove duplicate lines.  Of course
they are then also sorted.

See view > options to set it.

On 11/3/2011 12:35 PM, m_frascinella wrote:
> Hi,
>
> I searched the archive and couldn't find anything I can directly use.
>
> I have a clip that extracts lines you specify (tag names) from a Framemaker
MIF file, writes them to a file, and sorts them. The result is sometimes
hundreds of duplicate tag names.
>
> NoteTab does not seem to have a menu command or clip command to remove
duplicate lines, so I would like to know if someone could explain how to do
that.
>
> Here is my clip as it now stands:
>
> ^!Continue This clip copies all lines contain the text string you specify, and
puts them into a new file.
> ^!Set %Searchstring%=^?{Enter search string:}
> ^!SetListDelimiter ^P
> ^!Set %Lines%=^$GetDocMatchAll(^.*^%Searchstring%.*$)$
>
> ; open a new document and insert the found lines
> ^!Toolbar New Document
> ^!InsertText ^%Lines%
>
> ; remove all leading spaces before sorting
> ^!Replace "^[\s\t]+" >> "" AIRSW
>
> ; sort the lines in ascending order (a-z)
> ^!Menu modify/lines/sort/ascending
> ^!Select 0
>
> ; remove duplicate lines
>
>
> Yours,
>
> Michael F.
> ==========
>
>
>
> ------------------------------------
>
> Fookes Software: http://www.fookes.com/
> NoteTab website: http://www.notetab.com/
> NoteTab Discussion Lists: http://www.notetab.com/groups.php
>
> ***
> Yahoo! Groups Links
>
>
>
>

#22194 From: "C" <backup2abet@...>
Date: Thu Nov 3, 2011 6:33 pm
Subject: How to remove lines
abetsent
Send Email Send Email
 
Hi friends,

With regex,  how I remove (from a list of 1000 lines) all lines that include the
word "toremove" in the of a line?

I know, it is a stupid question, but I dont know how.

Thanks!

#22195 From: Jean-François Colas <jfcolas@...>
Date: Thu Nov 3, 2011 5:09 pm
Subject: Re: [Clip] deleting duplicate lines
jf_colas
Send Email Send Email
 
Hello,

Would the checkbox "Sort reoves duplicates", in the View / Options menu,
tab Tools, fit?

However I can't help for using this setting in clip if you don't want NT
to behave that way all the time.

Regards,
J.-F.

03/11/2011 17:35, m_frascinella a écrit :
> Hi,
>
> I searched the archive and couldn't find anything I can directly use.
>
> I have a clip that extracts lines you specify (tag names) from a Framemaker
MIF file, writes them to a file, and sorts them. The result is sometimes
hundreds of duplicate tag names.
>
> NoteTab does not seem to have a menu command or clip command to remove
duplicate lines, so I would like to know if someone could explain how to do
that.
>
> Here is my clip as it now stands:
>
> ^!Continue This clip copies all lines contain the text string you specify, and
puts them into a new file.
> ^!Set %Searchstring%=^?{Enter search string:}
> ^!SetListDelimiter ^P
> ^!Set %Lines%=^$GetDocMatchAll(^.*^%Searchstring%.*$)$
>
> ; open a new document and insert the found lines
> ^!Toolbar New Document
> ^!InsertText ^%Lines%
>
> ; remove all leading spaces before sorting
> ^!Replace "^[\s\t]+">>  "" AIRSW
>
> ; sort the lines in ascending order (a-z)
> ^!Menu modify/lines/sort/ascending
> ^!Select 0
>
> ; remove duplicate lines
>
>
> Yours,
>
> Michael F.
> ==========
>
>
>
> ------------------------------------
>
> Fookes Software: http://www.fookes.com/
> NoteTab website: http://www.notetab.com/
> NoteTab Discussion Lists: http://www.notetab.com/groups.php
>
> ***
> Yahoo! Groups Links
>
>
>

#22196 From: Don <don@...>
Date: Thu Nov 3, 2011 6:42 pm
Subject: Re: [Clip] How to remove lines
dpasseng
Send Email Send Email
 
^!Replace "^.*toremove.*\R" >> "" RAWS


On 11/3/2011 2:33 PM, C wrote:
> Hi friends,
>
> With regex,  how I remove (from a list of 1000 lines) all lines that include
the word "toremove" in the of a line?
>
> I know, it is a stupid question, but I dont know how.
>
> Thanks!

#22197 From: Axel Berger <Axel-Berger@...>
Date: Thu Nov 3, 2011 6:43 pm
Subject: Re: [Clip] How to remove lines
absalom_nemini
Send Email Send Email
 
C wrote:
> how I remove (from a list of 1000 lines) all lines that include
> the word "toremove" in the of a line?
> I know, it is a stupid question, but I dont know how.

Not really. I know Diodeom's solution will be more elgant, but this one
is as primitive and understandable as it gets:

^!Replace "\R.*(toremove).*\R" >> "\n" WRASTI

This is untested but ought to work. For some inexplicable reason writing
\r\n has sometimes resulted in two newlines here, no idea why, it
oughtn't, so I just put \n and the result is always fine. N:B: The
braces fulfil no function but making the term more legible.

Axel

--
             Dipl.-Ing. F. Axel Berger      Tel: +49/ 2174/ 7439 07
             Johann-Häck-Str. 14            Fax: +49/ 2174/ 7439 68
             D-51519 Odenthal-Heide       eMail: Axel-Berger@...
             Deutschland (Germany)         http://berger-odenthal.de

#22198 From: Axel Berger <Axel-Berger@...>
Date: Thu Nov 3, 2011 6:45 pm
Subject: Re: [Clip] deleting duplicate lines
absalom_nemini
Send Email Send Email
 
Jean-François Colas wrote:
> However I can't help for using this setting in clip if you don't want NT
> to behave that way all the time.

^$StrSort("Str";CaseSensitive;Ascending;RemoveDuplicates)$
(added in v4.52)

Returns the specified text "Str" sorted according to the defined
criteria. NoteTab 5 supports two new values for the CaseSensitive
parameter: ANSI to enforce a case sensitive dictionary-type sorting
order and False_ANSI to ignore character case during sorting. The ANSI
option produces a sorting order that matches the result from the
Modify/Lines/Sort menu command. Note, however, that sorting is much
slower with the ANSI option.

For example, the following instruction will sort the lines contained in
the Clipboard, in ascending order, ignoring character case, and removing
duplicates:

Axel

--
             Dipl.-Ing. F. Axel Berger      Tel: +49/ 2174/ 7439 07
             Johann-Häck-Str. 14            Fax: +49/ 2174/ 7439 68
             D-51519 Odenthal-Heide       eMail: Axel-Berger@...
             Deutschland (Germany)         http://berger-odenthal.de

#22199 From: "C" <backup2abet@...>
Date: Thu Nov 3, 2011 7:20 pm
Subject: How to remove lines with the word "xxx"
abetsent
Send Email Send Email
 
Hi friends Axel and Don, thanks.

Both suggestions do not worked.

Let say that I have this list:

a-gamal@...
a-jhemi@...
a.aanha@...
a.abdullayev@...
a.abouzeid@...
example@...

Let say that I want to remove all lines that have the "yahoo" word.

Thanks.

#22200 From: Axel Berger <Axel-Berger@...>
Date: Thu Nov 3, 2011 7:33 pm
Subject: Re: [Clip] How to remove lines with the word "xxx"
absalom_nemini
Send Email Send Email
 
C wrote:
> Both suggestions do not worked.

Sorry, have to disagree. Mine just worked fine on your list:

^!Replace "\R.*(yahoo).*\R" >> "\n" WRASTI

As Don's is nearly exactly the same I've no doubt his will too.

Axel

#22201 From: "C" <backup2abet@...>
Date: Thu Nov 3, 2011 7:42 pm
Subject: Re: How to remove lines with the word "xxx"
abetsent
Send Email Send Email
 
Hi,

Perhaps is because I used:

^!Set rdSDyahoo
^!Replace "\R.*(^rdŽ*\R" >> "\n" WRASTI

I need to use a variable, because will be a lot of different words.

Thsnks. I know that Axel is a guru.


--- In ntb-clips@yahoogroups.com, "C" <backup2abet@...> wrote:
>
> Hi friends Axel and Don, thanks.
>
> Both suggestions do not worked.
>
> Let say that I have this list:
>
> a-gamal@...
> a-jhemi@...
> a.aanha@...
> a.abdullayev@...
> a.abouzeid@...
> example@...
>
> Let say that I want to remove all lines that have the "yahoo" word.
>
> Thanks.
>

#22202 From: "C" <backup2abet@...>
Date: Thu Nov 3, 2011 7:46 pm
Subject: Re: How to remove lines with the word ^rd
abetsent
Send Email Send Email
 
In other words, I need to use a variable in place of the (....), because will be
a lot of different words.

------------------------------------


--- In ntb-clips@yahoogroups.com, "C" <backup2abet@...> wrote:
>
> Hi,
>
> Perhaps is because I used:
>
> ^!Set rdSDyahoo
> ^!Replace "\R.*(^rdŽ*\R" >> "\n" WRASTI
>
> I need to use a variable, because will be a lot of different words.
>
> Thsnks. I know that Axel is a guru.
>
>
> --- In ntb-clips@yahoogroups.com, "C" <backup2abet@> wrote:
> >
> > Hi friends Axel and Don, thanks.
> >
> > Both suggestions do not worked.
> >
> > Let say that I have this list:
> >
> > a-gamal@
> > a-jhemi@
> > a.aanha@
> > a.abdullayev@
> > a.abouzeid@
> > example@
> >
> > Let say that I want to remove all lines that have the "yahoo" word.
> >
> > Thanks.
> >
>

#22203 From: "John Shotsky" <jshotsky@...>
Date: Thu Nov 3, 2011 8:04 pm
Subject: RE: [Clip] Re: How to remove lines with the word ^rd
shotsky1
Send Email Send Email
 
You can separate all the words with pipes, and still run just one clip.
(word1|word2|word3|wordn)

Regards,
John
RecipeTools Web Site:  <http://recipetools.gotdns.com/>
http://recipetools.gotdns.com/

From: ntb-clips@yahoogroups.com [mailto:ntb-clips@yahoogroups.com] On Behalf Of
C
Sent: Thursday, November 03, 2011 12:47
To: ntb-clips@yahoogroups.com
Subject: [Clip] Re: How to remove lines with the word ^rd



In other words, I need to use a variable in place of the (....), because will be
a lot of different words.

------------------------------------

--- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , "C"
<backup2abet@...> wrote:
>
> Hi,
>
> Perhaps is because I used:
>
> ^!Set rdSDyahoo
> ^!Replace "\R.*(^rdŽ*\R" >> "\n" WRASTI
>
> I need to use a variable, because will be a lot of different words.
>
> Thsnks. I know that Axel is a guru.
>
>
> --- In ntb-clips@yahoogroups.com <mailto:ntb-clips%40yahoogroups.com> , "C"
<backup2abet@> wrote:
> >
> > Hi friends Axel and Don, thanks.
> >
> > Both suggestions do not worked.
> >
> > Let say that I have this list:
> >
> > a-gamal@
> > a-jhemi@
> > a.aanha@
> > a.abdullayev@
> > a.abouzeid@
> > example@
> >
> > Let say that I want to remove all lines that have the "yahoo" word.
> >
> > Thanks.
> >
>



[Non-text portions of this message have been removed]

#22204 From: "diodeom" <diomir@...>
Date: Thu Nov 3, 2011 8:06 pm
Subject: Re: How to remove lines with the word ^
diodeom
Send Email Send Email
 
"C" <backup2abet@...> wrote:
>
>
> In other words, I need to use a variable in place of the (....), because will
be a lot of different words.
>

Either:

^!Set %word%=yahoo
^!Replace "^.*?\Q^%word%\E.*(\R|\Z)" >> "" WARS

or:

^!Set %word%=yahoo
^!Find ^%word% WITS
^!IfError End
^!DeleteLine
^!Goto Skip_-3

#22205 From: "m_frascinella" <mfrascinella@...>
Date: Thu Nov 3, 2011 8:13 pm
Subject: Re: [Clip] deleting duplicate lines
m_frascinella
Send Email Send Email
 
Axel,

Jean-Francois's tip about View -> Options -> Tools ->Sort Removes Duplicates
definitely worked as a manual way to sort and remove duplicate lines.

I tried the StrSort statement but could not get it to work.

First of all, the StrSort statement did not turn blue (valid) as with other
Notetab statements.

Second, I was not sure how to grab all the lines I extracted. I tried this
thinking that my %Lines% variable was still active.
^$StrSort("^%Lines%";False;true;true)$

That did not work.

Then I tried:
^!Select all
^$StrSort("^$GetClipboard$";False;true;true)$

But this resulted in nothing in the new file but the StrSort statement.

What is wrong? The StrSort statement does not seem to be working for me.

Yours,

Michael F


--- In ntb-clips@yahoogroups.com, Axel Berger <Axel-Berger@...> wrote:
>
> Jean-François Colas wrote:
> > However I can't help for using this setting in clip if you don't want NT
> > to behave that way all the time.
>
> ^$StrSort("Str";CaseSensitive;Ascending;RemoveDuplicates)$
> (added in v4.52)

Messages 22176 - 22205 of 23787   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help