🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #264626

Re: [40tude] Edit -> Find regular expression?

#264626
From: mike
Date: Thu, 21 Jan 2021 13:15
76 lines
4493 bytes
VanguardLH wrote:

> When you hit F to bring up the Find dialog, and made sure to pick the
> "Article body pane" tab, did you also make sure to select the "Regular
> expressions" option?  Without that option, you would be searching on the
> ASCII string of \x{201C} instead of a searching by a regex specifying an
> escaped x followed by the braced numeric value for the Unicode char.
> 
> F (to show Find dialog).
> Select "Article body" tab.
> Select the "Regular expressions" option.
> Enter "\x{201C}.*\x{201D}" (sans quotes) in the "Text to find" field.
> Pick where to search: selected groups, all groups, selected body.
> 
> The search proceeds forward, not from the top.  If you are past the
> group or message with the doubled quotes, the search finds the *next*
> article, if any, that has those characters.  The search does not loop
> around back to the top after reaching the bottom of the list.

Thank you for explaining there are two different "Find" boxes, where below I
will call one of them the "short" Find Box & the other the "long" Find Box.

(1) In a browser I visit this page & copy the Demo sentence to my clipboard
https://www.lifewire.com/typing-quotes-apostrophes-and-primes-1074104
    ´Curly quotes¡ look better than "straight quotes"
(2) I then read your message & pressed F to followup to your message
(3) That followup takes up the entire Dialog window (on top of the "panes")
(4) I pasted that Demo sentence into the article body of that followup
(5) I hit control + f to bring up the Dialog "short" Find Box
(6) There is no option for "Regular Expression" in that "short" Find Box.
    Text to find
    Match case
    Whole words
    Backward search
(7) I hit Action -> Save and close draft
(8) I go back to the three dialog panes (group, messages, body)
(9) When hitting control F after putting the cursor in the resultant body
pane of the three pane Dialog window I get a "long" Find Box.
    Find text in...
    [Group list pane][Article header pane][Article body pane]<<<<
    Text to find:
    Options:
    Match case
    Whole words
    Regular expression <<<<
    Reset View first 

    Scope:
    Selected group
    All groups
    Selected body only <<<<
(10) I select "Article body pane"
(11) I select "Regular expression"
(12) The default is "Selected body only"
(13) I paste this into "Text to find:" \x{201C}.*\x{201D}
(14) That selects the first curlyquoted half of the Demo sentence.
(15) I copy just the opening curly doublequote character into my clipboard.

But since I'm not in an editable window, I can't fix anything using that
"long" Find Box. I can only fix text when using the "short" Find Box.

I go back to my editable window in my Drafts folder and bring up the "short"
Find Box, which I then paste the previously copied opening curly doublequote
into that "short" Find Box and hit "OK". 

This finds and selects the opening curly doublequote where I can then type a
straight doublequote to replace it. Since I had put the cursor at the top of
the message, I successively hit F3 to keep finding any more instances, and
then to replace them I just type the straight doublequote. 

I do the same for the closing curly doublequote (replacing it with a
straight doublequote by typing it once), which is pretty much exactly what I
was doing all along unfortunately.

This is the result
"Curly quotes" look better than "straight quotes"
Technical Details
Message-ID: <rubuok$j1b$1@solani.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <ru5nfg$si7$1@solani.org> <3xo0b6k69bco$.dlg@v.nguard.lh> <ruagkd$j08$1@solani.org> <1gf2aqovcfhb8.dlg@v.nguard.lh>

Show Full Headers
Complete Article Headers
Message-ID: <rubuok$j1b$1@solani.org>
Subject: Re: [40tude] Edit -> Find regular expression?
Date: Thu, 21 Jan 2021 18:45:01 +0530
From: mike <this@address.is.invalid>
References: <ru5nfg$si7$1@solani.org> <3xo0b6k69bco$.dlg@v.nguard.lh> <ruagkd$j08$1@solani.org> <1gf2aqovcfhb8.dlg@v.nguard.lh>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0
Injection-Date: Thu, 21 Jan 2021 13:15:02 -0000 (UTC)
Newsgroups: news.software.readers
Injection-Info: solani.org; logging-data="19499"; mail-complaints-to="abuse@news.solani.org"
X-User-Id: eJwFwYERADEIArCVKgr016mn+4/wCVOhdokqLncIPX8LKXZ8D5JVRJ7qOLhE0K54Uy0O+ltj8u0Eb1s/F+EUHg==
User-Agent: 40tude_Dialog/2.0.15.41 (0c24496a.39.280)
X-Received-Bytes: 4409
Cancel-Lock: sha1:dIgCj2RajyShgSlSNfYHC1HAopc=
Content-Transfer-Encoding: 7bit