copy and past to search and replace

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
Mike Olds
Posts: 227
Joined: Wed Sep 30, 2009 3:27 pm
Contact:

copy and past to search and replace

Post by Mike Olds »

Hello,

In the old TP I used to be able to copy and paste things like:

/n/n/n/n/n

and replace with

</p>\n \n <p>

Now in TP 7 the copy and paste needs to be edited, that is, it is useless. Is this going to be changed or is it just something I need to forget about?
Thank you, and
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
User avatar
bbadmin
Site Admin
Posts: 820
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Post by bbadmin »

Hello Mike,

Please will you be more explicit about what you're trying to do, including any regular expressions you are using.

Thanks,

Keith MacDonald
Helios Software Solutions
User avatar
Mike Olds
Posts: 227
Joined: Wed Sep 30, 2009 3:27 pm
Contact:

Post by Mike Olds »

Howdy Keith,

This happens while I am converting .txt files to .htm

In this case the text file has broken the paragraphs up with large numbers of lines between paragraphs and I want to save myself the work of replacing them individually with an end paragraph, empty line, new paragraph.

I used to be able to just copy from the end of one paragraph to the beginning of the next as the 'search for' and replace it with a copy and paste of an instance where I had it set up the way I wanted.

I hope that is clear?

There are other cases which are similar, that is involving line endings.

The 'regular expression' I am using is as above. That is a copy of what I used to be able to copy and paste into the search and replace dialog, select, 'regular expression' and replace.
Thank you, and
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
User avatar
bbadmin
Site Admin
Posts: 820
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Post by bbadmin »

Hi Mike,

In Perl regular expressions, "\n" only matches newline characters, so fails if the line ending includes carriage return. This has broken a lot of things, so we are changing "\n" to match all line endings. However, a good thing about Perl REs is that you can now record a macro to search for "\R{2,}" and replace it with "</p>\n\n<p>".

Hope this helps,
Keith
User avatar
Mike Olds
Posts: 227
Joined: Wed Sep 30, 2009 3:27 pm
Contact:

Post by Mike Olds »

Thanks Keith

What's with all the new updates? You guys are going to spoil your rep!
Thank you, and
Best Wishes,
Obo
http://buddhadust.net/
check out the What's New? Oblog:
http://buddhadust.net/dhammatalk/dhamma ... ts.new.htm
dforrest
Posts: 44
Joined: Mon Jan 19, 2004 11:19 pm
Location: St. Vincent and the Grenadines

Post by dforrest »

I am having the same problem. Is there any fix yet?

David
dforrest
Posts: 44
Joined: Mon Jan 19, 2004 11:19 pm
Location: St. Vincent and the Grenadines

Post by dforrest »

dforrest wrote:I am having the same problem. Is there any fix yet?

David
No answer and no fix.


.
User avatar
kengrubb
Posts: 324
Joined: Thu Dec 11, 2003 5:23 pm
Location: Olympia, WA, USA

Post by kengrubb »

What version of TP are you using?
(2[Bb]|[^2].|.[^Bb])

That is the question.
dforrest
Posts: 44
Joined: Mon Jan 19, 2004 11:19 pm
Location: St. Vincent and the Grenadines

Post by dforrest »

kengrubb wrote:What version of TP are you using?
7.0.9
User avatar
kengrubb
Posts: 324
Joined: Thu Dec 11, 2003 5:23 pm
Location: Olympia, WA, USA

Post by kengrubb »

OK, I asked about the version because there was an issue with \n and RE in a previous version, but you're using 7.0.9 so that's out.

I'm a little fuzzy on the problem you're experiencing. Could you give me more details, and I'll experiment?
(2[Bb]|[^2].|.[^Bb])

That is the question.
Post Reply