Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ntb-scripts · The NoteTab Scripts Group

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 211
  • Category: Software
  • Founded: Aug 29, 2002
  • Language: English
? 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 442 - 472 of 591   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#442 From: Eric Fookes <egroups@...>
Date: Tue May 26, 2009 12:14 pm
Subject: NoteTab 6.1 now available
eric_fookes
Send Email Send Email
 
Hi everyone,

We're pleased to announce the release of NoteTab 6.1 (all versions).
NoteTab Light is free as usual, and the retail versions are free for
registered users of version 5 and 6.

You'll find the update link in NoteTab's "Check for Updates" feature,
which is available from the Help menu. If you don't see the version 6.1
info in the News and Updates window, click on the "Get headlines" button
at the top-left of the screen to refresh the list.

Not a customer yet? Depending on your location, you can get a NoteTab
Pro or Std license at no cost through TrialPay. For more information,
click on the corresponding NoteTab license below:

NoteTab Pro
http://www.fookes.com/get_free.php?ntp

NoteTab Std
http://www.fookes.com/get_free.php?nts


Improvements since version 6.0:
-------------------------------

* When opening files, NoteTab can now automatically detect in most cases
the appropriate code page to display Unicode and UTF-8 documents.

* When saving Web files (those listed in Options), NoteTab automatically
uses the appropriate encoding based on the defined charset value.

* Added the Code Page submenu to the Tab-bar shortcut menu. This feature
lets you reload a document using a different code page. Useful in cases
when NoteTab doesn't automatically select the most appropriate code page.

* Improved Search Disk feature. It now correctly handles Unicode and
UTF-8 files, as well as files with non-Windows line breaks. During
find/replace operations, the searched file is loaded into memory and
temporarily converted to ANSI with Windows line breaks (CRLF). If a
replace operation has modified the data, NoteTab converts it back to its
original format before saving it to disk.

* Updated Export dialog box with UTF-8 and Unicode options.

* Added new "Format-Search Limit" setting on Advanced tab in Options
dialog box. See NoteTab Help for details.

* Included a new Clip-based Clip writing aid, "Clipcode Syntax"
(courtesy Sheri Pierce). See the Clip Help file for details.

* The "UTF-8 (no conversion)" code page option has been fixed and a new
"System Code Page" option added in the File Open dialog box.

* Fixed some issues with double-byte text and the rich-edit controls.

* Updated Help, documentation, and data files.

* Some other minor improvements and issues fixed.


* Clip-code additions:

^$GetCodePage$
Returns the default Windows ANSI Code page.

^$GetDocCodePage$
Returns the Code page of the active document.

^$GetDocCodePage(Index)$
Returns the Code page of the specified document.

--
Regards,

Eric Fookes
http://www.fookes.com/

#443 From: Eric Fookes <egroups@...>
Date: Thu May 28, 2009 6:17 pm
Subject: NoteTab Light/Std 6.1 slipstream update
eric_fookes
Send Email Send Email
 
Hi everyone,

A bug was recently discovered in the Replace All feature used in the
initial release of NoteTab Light and NoteTab Std 6.1. NoteTab Pro is not
affected.

This issue has now been fixed in a slipstream update. You can download
it through NoteTab's "Check for Updates" feature, which is available
from the Help menu.

If you don't see the update link with today's date in the News and
Updates window, make sure you click on the "Get headlines" button at the
top-left of the dialog box to refresh the list.

Sorry for the inconvenience.

--
Regards,

Eric Fookes
http://www.fookes.com/

#444 From: "Jimmy ...." <jimbobwilly2001@...>
Date: Sun May 31, 2009 2:29 am
Subject: Any way to run regular expressions on a text selection?
webmaster_jimmy
Send Email Send Email
 
Just the highlighted text only?

#445 From: "Don - HtmlFixIt.com" <don@...>
Date: Sun May 31, 2009 12:42 pm
Subject: Re: [NTS] Any way to run regular expressions on a text selection?
don@...
Send Email Send Email
 
sure ... use the selection only switch when using a find command ... but
your selection won't be the same any more

In a clip:
^!Find "SearchText" [Options TCIBGWHORSn]

H is the one you want:
H: Only searches within selection if text is highlighted (setting
ignored if no text selected).

  From the search dialog ...
just search with text highlighted and it defaults to the selection



Jimmy .... wrote:
> Just the highlighted text only?

#446 From: "Jimmy ...." <jimbobwilly2001@...>
Date: Sun May 31, 2009 9:37 pm
Subject: Re: [NTS] Any way to run regular expressions on a text selection?
webmaster_jimmy
Send Email Send Email
 
Thank you.

#447 From: Eric Fookes <egroups@...>
Date: Sat Jun 13, 2009 5:40 am
Subject: NoteTab 6.12 now available
eric_fookes
Send Email Send Email
 
Hi everyone,

We're pleased to announce the release of NoteTab 6.12 (all versions).
You'll find the update link in NoteTab's "Check for Updates" feature,
which is available from the Help menu. If you don't see the version 6.12
info in the News and Updates window, click on the "Get headlines" button
at the top-left of the screen to refresh the list.

Important: If you are updating from a previous version of NoteTab and
use the "Document to HTML" command, we recommend that you update the
"HTML Header" field on the Internet tab of the Options dialog box.
Change the charset value to utf-8 as shown in the following line:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


Improvements since version 6.1:
-------------------------------

* Added optional code page token support in template headers. The code
page value is placed between parentheses and is preceded by the letters
CP. The code page value should be one of the numeric values listed here:
http://www.notetab.com/redir/codepage. This example creates a new UTF-8
document:
= DocTemplate CP(65001)

* Added three templates that you can use to easily create new Unicode
documents.

* Included sample plain text and HTML files containing text based on a
variety of character sets (Arabic, Chinese, Cyrillic, Greek, Hebrew,
etc.) These files are stored in the Samples subfolder under the NoteTab
program folder.

* Added "Open Sample File" in SampleCode library. Use this Clip to open
a plain text or HTML file containing text based on a non-Western
character set (Arabic, Chinese, Cyrillic, Greek, Hebrew, etc.) The
purpose of these files is to demonstrate how NoteTab 6 handles text
based on different Windows code pages.

* Fixed the "Text Case" commands, which sometimes converted extended
characters based on non-system code pages incorrectly. Note that the
"Invert Case", Capitalize, and Sentence commands do not correctly handle
double-byte characters (DBCS) and so should only be used on parts of
text with Latin-based characters.

* Fixed the "Document to HTML" and "Characters to HTML" commands, which
previously assumed source text was always based on the Western ANSI
character set. This sometimes resulted in invalid HTML entities when
processing text based on other code pages.

* Fixed "String list does not allow duplicates" error that could
sometimes occur when opening Unicode and UTF-8 documents.

* Updated Help.

--
Regards,

Eric Fookes
http://www.fookes.com/

#448 From: "Steve B" <kalukee@...>
Date: Sat Jul 18, 2009 3:21 pm
Subject: Search and replace Regular Expression
kalukee
Send Email Send Email
 
I am a complete greenhorn with reg exp so sorry if this has been answered or its
a stupid question.

I want to replace all occurences of

LOwerCaseletter^PLOwerCaseletter with
LOwerCaseletterSPACELOwerCaseletter

When i do a save as *.txt of a pdf file the txt shows up as

This is a really
really long sentence
that
doesnt say
much.

I want it to say

This is a really really long sentence that doesnt say much.

Is there an online tutorial somewhere?

Thanks

#449 From: "Sheri" <silvermoonwoman@...>
Date: Sat Jul 18, 2009 9:30 pm
Subject: Re: Search and replace Regular Expression
silvermoonwo...
Send Email Send Email
 
--- In ntb-scripts@yahoogroups.com, "Steve B" <kalukee@...> wrote:
>
> I am a complete greenhorn with reg exp so sorry if this has been answered or
its a stupid question.
>
> I want to replace all occurences of
>
> LOwerCaseletter^PLOwerCaseletter with
> LOwerCaseletterSPACELOwerCaseletter
>
> When i do a save as *.txt of a pdf file the txt shows up as
>
> This is a really
> really long sentence
> that
> doesnt say
> much.
> I want it to say
>
> This is a really really long sentence that doesnt say much.
>

Try this, should also work from the replace dialog.

^!Replace "(?-i)[a-z]\K\x20*$\R" >> "\x20" RAWS0

It says:

(?-i) not case insensitive
[a-z] a character that is in the range of lower case a-z
\K says leave out the part preceding when forming the match that will get
replaced (iow, leave the lower case a-z character)
\x20* would match any number (or zero) spaces
$ matches at the end of a line (but consumes no characters)
\R matches the line breaking characters that follow the end of the line

"\x20" is hex for one space.

It is only going to replace any empty spaces and line breaking characters
provided that they follow a lower case letter.

Actually to precisely do what you asked could be done with:

^!Replace "(?-i)[a-z]$\K\R([a-z])" >> "\x20$1" RAWS0

Then it doesn't worry about possibly empty spaces at line ends and requires a
lower case letter after the line break, which it captures as $1 for the
replacement.

>
> Is there an online tutorial somewhere?

Hmmn, a link that I had for a good tutorial isn't working anymore. I will see if
I can find my copy of the file and if so will post it in the files area of this
group. However, the most uptodate info on the version of PCRE regex supported by
NoteTab is in the regex.chm file in the NoteTab application folder.

Regards,
Sheri

#450 From: "Don - HtmlFixIt.com" <don@...>
Date: Sat Jul 18, 2009 9:11 pm
Subject: Re: [NTS] Search and replace Regular Expression
don@...
Send Email Send Email
 
replace this
([a-z])\r\n([a-z])
with this
$1 $2

Putting something in () means it is captured as a subpattern that can
then be put back in the replace.

[a-z] is a lowercase letter
\r\n is a return character

so you are looking for lower case letter followed by a return and then
replacing it with the same lower case letter, a space, the same lower
case letter

You can do it with a clip or search and replace.

Steve B wrote:
> I am a complete greenhorn with reg exp so sorry if this has been answered or
its a stupid question.
>
> I want to replace all occurences of
>
> LOwerCaseletter^PLOwerCaseletter with
> LOwerCaseletterSPACELOwerCaseletter
>
> When i do a save as *.txt of a pdf file the txt shows up as
>
> This is a really
> really long sentence
> that
> doesnt say
> much.
>
> I want it to say
>
> This is a really really long sentence that doesnt say much.
>
> Is there an online tutorial somewhere?
>
> Thanks
>
>
>
>
>
>
> ------------------------------------
>
> Fookes Software: http://www.fookes.com/
> NoteTab website: http://www.notetab.com/
> NoteTab Discussion Lists: http://www.notetab.com/groups.php
>
> ***
> Yahoo! Groups Links
>
>
>
>

#451 From: "Don - HtmlFixIt.com" <don@...>
Date: Sun Jul 19, 2009 3:06 am
Subject: Re: [NTS] Re: Search and replace Regular Expression
don@...
Send Email Send Email
 
I have the tutorial you sent a while back Sheri, it is a microsoft
powerpoint or something, but I made a text copy I use myself :-)

\K is my learning for the day I guess ... wow, so that essentially
leaves everything before the \K untouched on replacement?

Is notetab case insensitive by default so that we should use the -i?


> Actually to precisely do what you asked could be done with:
>
> ^!Replace "(?-i)[a-z]$\K\R([a-z])" >> "\x20$1" RAWS0
>
> Then it doesn't worry about possibly empty spaces at line ends and requires a
lower case letter after the line break, which it captures as $1 for the
replacement.
>
>> Is there an online tutorial somewhere?
>
> Hmmn, a link that I had for a good tutorial isn't working anymore. I will see
if I can find my copy of the file and if so will post it in the files area of
this group. However, the most uptodate info on the version of PCRE regex
supported by NoteTab is in the regex.chm file in the NoteTab application folder.
>

#452 From: "Sheri" <silvermoonwoman@...>
Date: Sun Jul 19, 2009 3:28 pm
Subject: Re: Search and replace Regular Expression
silvermoonwo...
Send Email Send Email
 
--- In ntb-scripts@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
> > Is there an online tutorial somewhere?
>
> Hmmn, a link that I had for a good tutorial isn't working
> anymore. I will see if I can find my copy of the file and if so
> will post it in the files area of this group. However, the most
> uptodate info on the version of PCRE regex supported by NoteTab
> is in the regex.chm file in the NoteTab application folder.

Found it (newer date, but looks about the same as the older one I had):

<http://gravitonic.com/c/dl.php?file=talks/php-quebec-2009/regex-clinic.pdf>

Regards,
Sheri

#453 From: "Steve B" <kalukee@...>
Date: Sun Jul 19, 2009 4:23 pm
Subject: Re: Search and replace Regular Expression
kalukee
Send Email Send Email
 
thanks for the replies, i am still digesting what was given.:)


--- In ntb-scripts@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
>
> --- In ntb-scripts@yahoogroups.com, "Sheri" <silvermoonwoman@> wrote:
> > > Is there an online tutorial somewhere?
> >
> > Hmmn, a link that I had for a good tutorial isn't working
> > anymore. I will see if I can find my copy of the file and if so
> > will post it in the files area of this group. However, the most
> > uptodate info on the version of PCRE regex supported by NoteTab
> > is in the regex.chm file in the NoteTab application folder.
>
> Found it (newer date, but looks about the same as the older one I had):
>
> <http://gravitonic.com/c/dl.php?file=talks/php-quebec-2009/regex-clinic.pdf>
>
> Regards,
> Sheri
>

#454 From: Alec Burgess <buralex@...>
Date: Sun Jul 19, 2009 5:55 pm
Subject: Re: [NTS] Re: Search and replace Regular Expression
alecb3ca
Send Email Send Email
 
Steve: I'll bet your mind is reeling, especially if you tried to digest
everything in Sheri's excellent reference PDF in one pass.
Another you might want to have a look at (less scrolling and repetition)
but denser presentation is: http://www.regular-expressions.info/

Its the "I'm feeling lucky"(#1 hit) if you just google [regular expressions]
In fact it's #1 on all of the big three Google, Bing and Yahoo (check
with http://blindsearch.fejus.com/ ) 8-)
<aside> I wonder how Jan Goyvaerts, author of RegexBuddy, managed to
establish and maintain that position? </aside>

I just want to point out that your original question (joining split
lines back into one) can be handled in Notetab by menu-Modify-Lines-Join
Lines (aka Ctrl+J) and well worth putting its button on your toolbar.
Just select the lines you want joined and issue Ctrl+J or select
multiple groups of split lines separated by blank lines and do them all
with one key press.

That said, I hope you continue with exploring regular expressions - once
you achieve a little bit of comfort with them you'll find many other
programs in addition to Notetab where they can be used.

Steve B (kalukee@...) wrote (in part)  (on 2009-07-19 at 12:23):
>  thanks for the replies, i am still digesting what was given.:)
>
>  --- In ntb-scripts@yahoogroups.com, "Sheri" <silvermoonwoman@...>
>  wrote:
>  >
>  > --- In ntb-scripts@yahoogroups.com, "Sheri" <silvermoonwoman@>
>  wrote:
>  > > > Is there an online tutorial somewhere?
>  > >
>  > > Hmmn, a link that I had for a good tutorial isn't working
>  > > anymore. I will see if I can find my copy of the file and if so
>  > > will post it in the files area of this group. However, the most
>  > > uptodate info on the version of PCRE regex supported by NoteTab
>  > > is in the regex.chm file in the NoteTab application folder.
>  >
>  > Found it (newer date, but looks about the same as the older one I
>  had):
>  >
>  >
>
<http://gravitonic.com/c/dl.php?file=talks/php-quebec-2009/regex-clinic.pdf>

--
Regards ... Alec   (buralex@gmail & WinLiveMess - alec.m.burgess@skype)




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

#455 From: "mycroftj" <mycroftj@...>
Date: Tue Oct 6, 2009 7:45 pm
Subject: Trying to find lines with same first 30 chars
mycroftj
Send Email Send Email
 
I know that ^(.*\R)(\1)+ will find (sorted) duplicate lines but I want to find
lines that only match the first 30 characters.

I thought ^(.{30})(\1)+ would work, but it does not.
When I do a test and use ^(.{2})  it matches the first two chars on line one,
then the next two chars and stops.

What am I not understanding?

Thanks!

Joy

#456 From: "Sheri" <silvermoonwoman@...>
Date: Wed Oct 7, 2009 1:01 am
Subject: Re: Trying to find lines with same first 30 chars
silvermoonwo...
Send Email Send Email
 
--- In ntb-scripts@yahoogroups.com, "mycroftj" <mycroftj@...> wrote:
>
> I know that ^(.*\R)(\1)+ will find (sorted) duplicate lines but I want to find
lines that only match the first 30 characters.
>
> I thought ^(.{30})(\1)+ would work, but it does not.
> When I do a test and use ^(.{2})  it matches the first two chars on line one,
then the next two chars and stops.
>
> What am I not understanding?
>
> Thanks!
>
> Joy
>

Sounds like you need to match not only the first 30 characters, but also the
rest of the line. Then after that line, continue matching subsequent whole lines
where the first 30 characters are the same as the ones on the starting line.
Untested, but I think this should work:

^(.{30}).*\R(\1.*\R)+

Regards,
Sheri

#457 From: "mycroftj" <mycroftj@...>
Date: Wed Oct 7, 2009 1:16 am
Subject: Re: Trying to find lines with same first 30 chars
mycroftj
Send Email Send Email
 
Sheri

Thank you. You are correct and your suggestion works perfectly.
I'd never have guessed that one.

Joy



--- In ntb-scripts@yahoogroups.com, "Sheri" <silvermoonwoman@...> wrote:
>
> Sounds like you need to match not only the first 30 characters, but also the
rest of the line. Then after that line, continue matching subsequent whole lines
where the first 30 characters are the same as the ones on the starting line.
Untested, but I think this should work:
>
> ^(.{30}).*\R(\1.*\R)+
>
> Regards,
> Sheri
>
>
> --- In ntb-scripts@yahoogroups.com, "mycroftj" <mycroftj@> wrote:
> >
> > I know that ^(.*\R)(\1)+ will find (sorted) duplicate lines but I want to
find lines that only match the first 30 characters.
> >
> > I thought ^(.{30})(\1)+ would work, but it does not.
> > When I do a test and use ^(.{2})  it matches the first two chars on line
one, then the next two chars and stops.
> >
> > What am I not understanding?
> >
> > Thanks!
> >
> > Joy
> >
>

#458 From: Art Kocsis <artkns@...>
Date: Wed Oct 7, 2009 11:58 pm
Subject: Re: [NTS] Search and replace Regular Expression
artkns
Send Email Send Email
 
Hello Steve,

A month ago I posted an extensive list and discussion of RegEx
resources on the NoteTab Clips group:

     Date: Fri, 04 Sep 2009 23:57:46 -0700
     Subject: [Clip] RegEx Resources
     http://tech.groups.yahoo.com/group/ntb-clips/message/19616

There are links to tutorials that are understandable by newbies. I found
them to be very helpful and also good refreshers. The built-in NoteTab
RegEx help file is basically a regurgitation of the official RegEx spec
written by Philip Hazel. It was written as a reference document, not as
a tutorial and assumes you already know what a RegEx is.

The Perl.org tutorials start from the basic "hello world" level and have
lots of examples. Just ignore the Perl specific syntax and absorb the
RegEx info. The perlrequick document is a good tool to print out and
keep handy.

To the Group: I suspect I am not the only one who didn't realize (or
forgot), that this is one of two overlapping NoteTab groups on Yahoo.
This one (NoteTab Scripts) seems to have almost the same agenda
as NoteTab Clips. Both deal with clips and both deal with RegEx.

Why two groups??? It's been years since I set up my email filters so
any distinction is long lost and I have been operating on automatic
ever since. It would seem that, short of dual posting, a lot of info and
interested audience is lost. I would guess that not every one is signed
up with both groups.

Namaste',  Art

At 07-18-2009 08:21, you wrote:
>I am a complete greenhorn with reg exp so sorry if this has been answered
>or its a stupid question.
<snip>

>Is there an online tutorial somewhere?
>
>Thanks

   ----------


No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.5.421 / Virus Database: 270.14.5/2419 - Release Date: 10/07/09
05:18:00


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

#459 From: "RudiV" <ms65@...>
Date: Wed Nov 18, 2009 10:18 pm
Subject: Can you please help???
ms65
Send Email Send Email
 
Hopefully, you folks are less arrogant than Julian, and allow me to have a
pro-active exchange¡K

As a retired IT guy of 35 years, knowing unix (realtime), I never had much need
to use Perl (though I could work SED faster than many folks using a GUI), the
only syntax I know is SQL¡K So any help here is greatly appreciated in
completing this project for my Grandson and his Buddies¡K

Thanks in advance¡KRudi


¡§Hi Rudi,

As explained in our documentation, our customer support service does not have
the time resources to help you develop regular expressions.¡¨

>>>
  Julian,

This looks likes some very promising software for my use. I was able to get what
I was trying to accomplish done, but it took a lot of extra time as I do not
really know how to use your software yet. If the following can be accomplished;
will need the example syntax from you folks, I will buy the Pro Version and
learn the rest on my own.

I¡¦ve attached a jpeg file of the data file I am trying to convert. My question
below references this screen shot:

(For this Message Board I¡¦ve converted the jpeg to text, I hope there are some
smatter folks here than at Fookes¡¦s Tech-Support, they do not seem to want to
attract or hold new customers ļ)
>>>>

Jpeg converted to text:

line 1: <?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>
line 2: <cardset setname="5D's Starter Deck 2009"
line 3: releasedate="2009-06-09"
line 4: card_count="43">
line 5: <card id="5DS2-EN001"
line 6- name="Gogiga Gagagigo"
		 passcode="39674352"
		 type="Normal Monster"
		 monster_type="Reptile"
		 attribute="Water"
		 level="8"
		 attack="2950"
		 defense="2800"
		 rarity="Common">
		 <card_text>His soul long-since collapsed, his body recklessly continues
onward, driven by a lust for more power. He no longer resembles his former
self....</card_text>
	 </card>
Line etc: </cardset>
>>>>


I had to do the Replace option in 3 steps: as I could not figure out how to
embed the CRLF and the end of each line into the find command)

1) Line 2 as:   find:  <cardset(.*) 	 replace with ABCDEF
2) Line 3 as:  find: releasedate(.*) replace with ABCDEF
3) Line 4 as:  find card_count(.*) replace with ABCDEF
4) Save as a txt file
5) Use Notepad to find ABCDEF and replace with a blank line.

(I could not figure out what character in your software to specify in the
replace field for a blank line)

What I would have liked to have been able to do was steps 1-3 above in 1 find
sequence (syntax?) and then have replace replace the found string with blank
lines.

Thanks in advance for you assistance!!!

Best,
Rudi

#460 From: Eric Fookes <egroups@...>
Date: Thu Nov 19, 2009 8:05 am
Subject: Re: [Clip] Hope this is the correct board...Need help Please...
eric_fookes
Send Email Send Email
 
Hi Rudi,

> Hopefully, you folks are less arrogant than Julian, and allow me to have a
pro-active exchange¡K

Julian is not arrogant! He is following Fookes Software support
policies. Here's a quote from our support page:

"Please note that Fookes Software representatives cannot provide
in-depth end-user training. We can assist you if you are having a
technical problem, but we cannot teach you how to use the software, to
create or modify templates, or to develop scripts and regular expression
searches."

Julian is an employee and receives a salary for his work in providing
users FREE technical support. For reasons I'm sure you can understand,
this free support cannot be unlimited. Otherwise we would have to charge
for it or go out of business.

--
Regards,

Eric Fookes
http://www.fookes.com/

#461 From: Al <acummingsus@...>
Date: Thu Nov 19, 2009 8:10 am
Subject: regex or substitution or replace characterized stuff was Can you please help???
acummingsus
Send Email Send Email
 
Hi,

You mentioned Perl?

I'm not sure what your question is.

1. Enclosed perl below is close if you not need to go multi or across
line(s) with search criteria.

2. But if each or any of your search item overlaps line(s) then **the
enclosed perl below will not work**

In the case of 2 above, you will need to do a file slurp into a scalar
variable and then utilize of anti greed operator(s) in the substitution
and also use the g for global option (# 2 gets more trickier to do than
# 1 above.)

s/first/second/g;

Above shows the g option in use with the substitution operator.  Finding
appropriate anti greed is an exercise that I leave up for grabs.



#!/usr/bin/perl -w
use strict;

my $old = shift;
my $new = "$old.tmp";
# my $base_url = ';
open(OLD, "<", $old)  or die "cant open $old: $!";
open(NEW, ">", $new)  or die "cant open $new: $!";
while (<OLD>) {

# 1
# s/<cardset\.*|releasedate\.*|card_count\.*/\n/;

# or (instead of # 1)

s/<cardset\.*/\n/;
s/releasedate\.*/\n/;
s/card_count\.*/\n/;


# puts each line, modified or not, into NEW
print NEW $_;
}
# print NEW $htm_tag;
close(OLD)  or die "cant open $old: $!";
close(NEW)  or die "cant close $new: $!";
rename($old, "$old.orig")  or die "cant rename $old to $old.orig: $!";
rename($new, "$old")  or die "cant rename $new to $old: $!";
# end

Alan.

RudiV wrote:
> < . . . >
> I had to do the Replace option in 3 steps: as I could not figure out how to
embed the CRLF and the end of each line into the find command)
>
> 1) Line 2 as:   find:  <cardset(.*) 	 replace with ABCDEF
> 2) Line 3 as:  find: releasedate(.*) replace with ABCDEF
> 3) Line 4 as:  find card_count(.*) replace with ABCDEF
> 4) Save as a txt file
> 5) Use Notepad to find ABCDEF and replace with a blank line.
>
> (I could not figure out what character in your software to specify in the
replace field for a blank line)
>
> What I would have liked to have been able to do was steps 1-3 above in 1 find
sequence (syntax?) and then have replace replace the found string with blank
lines.
>
> Thanks in advance for you assistance!!!
>
> Best,
> Rudi
>

#462 From: "Sheri" <silvermoonwoman@...>
Date: Thu Nov 19, 2009 4:41 pm
Subject: Re: Can you please help???
silvermoonwo...
Send Email Send Email
 
--- In ntb-scripts@yahoogroups.com, "RudiV" <ms65@...> wrote:
>
> I had to do the Replace option in 3 steps: as I could not figure
> out how to embed the CRLF and the end of each line into the find
> command)
>
> 1) Line 2 as:   find:  <cardset(.*) 	 replace with ABCDEF
> 2) Line 3 as:  find: releasedate(.*) replace with ABCDEF
> 3) Line 4 as:  find card_count(.*) replace with ABCDEF
> 4) Save as a txt file
> 5) Use Notepad to find ABCDEF and replace with a blank line.
>
> (I could not figure out what character in your software to
> specify in the replace field for a blank line)

>
> What I would have liked to have been able to do was steps 1-3
> above in 1 find sequence (syntax?) and then have replace replace
> the found string with blank lines.
>
> Thanks in advance for you assistance!!!
>

Hi Rudi,

Using regex in NoteTab's Find and Replace dialog or clipcode, you can match CRLF
with \R or with \r\n. Another way is to include linebreak characters in what
matches dot, by including (?s) at the beginning of your find pattern.

You can include a CRLF in replacement text with \r\n

However, I believe the following would best suit your purposes:

^!Replace "^(<cardset|releasedate|card_count).+" >> "" RAWS

Since the CRLF is not matched, it is still in the file after the replacement. If
you want an extra line inserted for each match, it would be:

^!Replace "^(<cardset|releasedate|card_count).+" >> "\r\n" RAWS

There is a detailed, techy regex.chm file in the NoteTab application folder that
gives all the details for the PCRE regex engine used in NoteTab. You can access
it from the Help menu.

Regards,
Sheri

#463 From: "Sheri" <silvermoonwoman@...>
Date: Thu Nov 19, 2009 5:03 pm
Subject: Re: [Clip] Hope this is the correct board...Need help Please...
silvermoonwo...
Send Email Send Email
 
Hi Eric,

Julian allegedly said:

>> As explained in our documentation, our customer support service
>> does not have the time resources to help you develop regular
>> expressions.

--- In ntb-scripts@yahoogroups.com, Eric Fookes <egroups@...> wrote:
>
> Julian is not arrogant! He is following Fookes Software support
> policies. Here's a quote from our support page:

I don't think it is productive for Julian to say essentially "we don't have time
to help you," which regardless of the accuracy sounds arrogant. I also doubt the
exclamation point on your response is going to change the perception. IMO the
customer is always right, even if the product is free. :D

I would suggest customer support respond to similar inquiries with something
more like this:

"While help with scripts and regular expressions is beyond the scope of customer
technical support, we have active and helpful user forums".

Regards,
Sheri

#464 From: Eric Fookes <egroups@...>
Date: Thu Nov 19, 2009 5:24 pm
Subject: Re: [NTS] Re: [Clip] Hope this is the correct board...Need help Please...
eric_fookes
Send Email Send Email
 
Hi Sheri,

> I don't think it is productive for Julian to say essentially "we
> don't have time to help you," which regardless of the accuracy sounds
> arrogant. I also doubt the exclamation point on your response is
> going to change the perception. IMO the customer is always right,
> even if the product is free. :D

I'm often surprised how we perceive things differently across the
Atlantic. I don't see it that way but respect your opinion.

> I would suggest customer support respond to similar inquiries with
> something more like this:
>
> "While help with scripts and regular expressions is beyond the scope
> of customer technical support, we have active and helpful user
> forums".

Thanks for your suggestion :)

--
Regards,

Eric Fookes
http://www.fookes.com/

#465 From: "Don - HtmlFixIt.com" <don@...>
Date: Thu Nov 19, 2009 10:38 pm
Subject: Re: [NTS] Re: [Clip] Hope this is the correct board...Need help Please...
don@...
Send Email Send Email
 
Hi Eric,

Since this is the notetab scripts list I figure it's pretty sturdy and
can handle an off topic post.

I wrote back too (however your email address rejected me in my attempt
for a private direct communication) and suggested that you might better
have let the water roll off your back.  Rudi has apologized, but I
understand he was frustrated.  He probably over-reacted [here I inserted
a movie reference] but I also get what he was saying.  He had a belief
that the product would do what he wanted, but needed to know before
purchasing the pro version.

Notetab is the BEST software thing that has ever happened to me.
JingProject.com is a close second I'll say.  In any event, I agree with
Sheri's assessment of how to better handle such an inquiry in the future.

If it makes any of us feel better, Jody occasionally rubbed someone the
wrong way as well ... and we all know how loved he was by our community
... so notetab is alive and well ;-) and Jody isn't forgotten.

Now lets all have a group hug and get back to what we do best,
processing files!

A huge fan of Fookes,

Don Passenger
Stateside/Middle

p.s. I remember how baffled I was by regex for several years -- and here
I solved the issue with regex apparently.  Now I still don't get half of
Sheri's and Flo's regex solutions ... but I can sometimes decipher them
in less than an hour now.

Sheri wrote:
> Hi Eric,
>
> Julian allegedly said:
>
>>> As explained in our documentation, our customer support service
>>> does not have the time resources to help you develop regular
>>> expressions.
>
> --- In ntb-scripts@yahoogroups.com, Eric Fookes <egroups@...> wrote:
>> Julian is not arrogant! He is following Fookes Software support
>> policies. Here's a quote from our support page:
>
> I don't think it is productive for Julian to say essentially "we don't have
time to help you," which regardless of the accuracy sounds arrogant. I also
doubt the exclamation point on your response is going to change the perception.
IMO the customer is always right, even if the product is free. :D
>
> I would suggest customer support respond to similar inquiries with something
more like this:
>
> "While help with scripts and regular expressions is beyond the scope of
customer technical support, we have active and helpful user forums".
>
> Regards,
> Sheri
>

#466 From: "Don - HtmlFixIt.com" <don@...>
Date: Thu Nov 19, 2009 10:51 pm
Subject: Re: Regular Expressions was Re: Can you please help???
don@...
Send Email Send Email
 
Sheri,

Now is a good time for us to repeat the helpful links for regex help
that you have given before (one is at end of this email).  One of them
is what finally got me over (or at least on) the hump of understanding.
   It was a helpful tips type of presentation.  I converted it from a
powerpoint to plain text so that I could use it in notetab easier (and
search it better) and I also now keep a "handyregexbits.txt" file in my
favorites.  It has things like (?s) in it which is the multi-line
designation.

I find I use it less and less as I actually now start to understand what
I am doing and why I am doing it.

Lastly I would encourage anyone starting with regex to get regex buddy.
   Whenever a pattern I write doesn't match as expected, I use that
program.  I start slowly at the left and move to the right and it shows
what is matched when you select part of the search term it highlights
the match in the lower window.  Solves many issues.

Someday I'll tackle look backs and assertions and stuff like that ...
but for now, I really think I can do some amazing stuff with a good
regex search term.  I still use \r\n just because \R didn't work when I
started ... I'll try to improve and actually I have used \R a few times
lately.

Have a great night everyone.

Don

The link:
http://www.gravitonic.com/talks/
Andrei’s Regex Clinic
I note that there are some more recent versions -- I'll have to download
and see if they have advanced.

I believe regex discussion is essentially welcome either her or in clips
list.  Is that fair?  I have copied both groups.

>
> Hi Rudi,
>
> Using regex in NoteTab's Find and Replace dialog or clipcode, you can match
CRLF with \R or with \r\n. Another way is to include linebreak characters in
what matches dot, by including (?s) at the beginning of your find pattern.
>
> You can include a CRLF in replacement text with \r\n
>
> However, I believe the following would best suit your purposes:
>
> ^!Replace "^(<cardset|releasedate|card_count).+" >> "" RAWS
>
> Since the CRLF is not matched, it is still in the file after the replacement.
If you want an extra line inserted for each match, it would be:
>
> ^!Replace "^(<cardset|releasedate|card_count).+" >> "\r\n" RAWS
>
> There is a detailed, techy regex.chm file in the NoteTab application folder
that gives all the details for the PCRE regex engine used in NoteTab. You can
access it from the Help menu.
>
> Regards,
> Sheri

#467 From: Eric Fookes <egroups@...>
Date: Wed Jan 27, 2010 7:22 am
Subject: NoteTab 6.2 now available
eric_fookes
Send Email Send Email
 
Hi everyone,

We're pleased to announce the release of NoteTab 6.2 (all versions).
You'll find the update link in NoteTab's "Check for Updates" feature,
which is available from the Help menu. If you don't see the version 6.2
info in the News and Updates window, click on the "Get headlines" button
at the top-left of the screen to refresh the list. Make sure you allow
NoteTab to connect to the Internet.


Improvements in this version:
-----------------------------

* Updated the regular expressions engine to the latest release, which is
based on PCRE 8.01 (Perl 5.10).

* Now uses the Windows user-interface default font instead of MS Sans Serif.

* Fixed an issue when saving Web pages that have a mismatch between
their charset declaration (Unicode) and the actual file format (not
Unicode).

--
Regards,

Eric Fookes
http://www.fookes.com/

#468 From: "tallguy354u1" <robb@...>
Date: Sat Feb 20, 2010 7:29 pm
Subject: Perl leaves a binary character after a switch statement runs via NTP editor
tallguy354u1
Send Email Send Email
 
Hi, I have been using NoteTabPro for many many years.  I use Perl to run scripts
over highlighted text.  Since the new OS of XP Pro I have noticed that when the
Perl script runs that it dumps a binary character at the end of the replacement
text. Does anyone using Perl in this way have an idea how to resolve the issue?

NoteTabPro 4.95
Perl ActivePerl-5.10.0.1004-MSWin32-x86-287188.msi

Thanks for any info!


Robb

#469 From: Alec Burgess <buralex@...>
Date: Sat Feb 20, 2010 10:34 pm
Subject: Re: [NTS] Perl leaves a binary character after a switch statement runs via NTP editor
alecb3ca
Send Email Send Email
 
Robb: This was apparently a known bug up to Notetab 5 (I found
discussion of it in the beta group)

Sheri said: > Will you be fixing the ^!RunPerl bug. For years (every
version of
>  Perl since 5.6) anything returned to a Notetab buffer by a Perl
>  script is terminated with a box character. It is a decimal 26 or hex
>  1A or Ctrl-Z.
Eric said > ... fixed next beta ...

I suggest you (at least) get the trial version of current Notetab 6 and
verify (or otherwise) the bug has been corrected.
If you are using Perl you might find that the improvements to regexp
engine allow things to be done all in native Notetab clips which
otherwise would have been much too slow or impossible to express.


tallguy354u1 wrote:
> Hi, I have been using NoteTabPro for many many years.  I use Perl to run
scripts over highlighted text.  Since the new OS of XP Pro I have noticed that
when the Perl script runs that it dumps a binary character at the end of the
replacement text. Does anyone using Perl in this way have an idea how to resolve
the issue?
>
> NoteTabPro 4.95
> Perl ActivePerl-5.10.0.1004-MSWin32-x86-287188.msi
>
> Thanks for any info!
>
>
> Robb
>
>
>
>

--
Regards ... Alec   (buralex@gmail & WinLiveMess - alec.m.burgess@skype)



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

#471 From: "tallguy354u1" <robb@...>
Date: Sat Mar 20, 2010 3:01 am
Subject: reload library on .clb save
tallguy354u1
Send Email Send Email
 
I am using NoteTabPro 6.2 and can't get a custom built library to reload itself.
In past versions of NTP once the .clb was saved to disk the clipbook would
reload the changes and update itself.  It no longer does this and has also
relisted the contents of the library in a clump.  Is there any way to reload a
library so that the clipbook will refresh itself in version 6.2 f/v?

Thanks for any thoughts on this!

Robb

#472 From: hsavage <hsavage@...>
Date: Sat Mar 20, 2010 5:45 am
Subject: Re: [NTS] reload library on .clb save
hrs62930
Send Email Send Email
 
tallguy354u1 wrote:
  > I am using NoteTabPro 6.2 and can't get a custom built library to
  > reload itself.  In past versions of NTP once the .clb was saved to
  > disk the clipbook would reload the changes and update itself.  It no
  > longer does this and has also relisted the contents of the library
  > in a clump.  Is there any way to reload a library so that the clipbook
  > will refresh itself in version 6.2 f/v?
  >
  > Thanks for any thoughts on this!
  >
  > Robb

Robb,

At first thought it sounds as if you have accidentally deleted the
first line in said clipbook.
The first line, followed by a blank line should read

'= V5 MultiLine NoSorting TabWidth=30'

without the single quotes.

A clipbook without the proper first line identifier will 'clump'
together when displayed in the clipbook panel.

·············································
ºvº SL_day# 079 - created 2010.03.20_00.38.49

    Great Truth About Growing Old:
   • Time may be a great healer, but it's a lousy beautician.

   € hrs €  hsavage € pobox € com

  >

Messages 442 - 472 of 591   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