Page 1 of 1

copy and past to search and replace

Posted: Mon Apr 15, 2013 3:41 pm
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?

Posted: Mon Apr 15, 2013 3:47 pm
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

Posted: Mon Apr 15, 2013 3:54 pm
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.

Posted: Mon Apr 15, 2013 4:18 pm
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

Posted: Mon Apr 15, 2013 5:55 pm
by Mike Olds
Thanks Keith

What's with all the new updates? You guys are going to spoil your rep!

Posted: Tue Jul 02, 2013 5:21 pm
by dforrest
I am having the same problem. Is there any fix yet?

David

Posted: Thu Aug 01, 2013 3:24 pm
by dforrest
dforrest wrote:I am having the same problem. Is there any fix yet?

David
No answer and no fix.


.

Posted: Thu Aug 01, 2013 9:27 pm
by kengrubb
What version of TP are you using?

Posted: Sun Aug 04, 2013 4:50 pm
by dforrest
kengrubb wrote:What version of TP are you using?
7.0.9

Posted: Wed Aug 07, 2013 10:41 pm
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?