Regular Expression syntax for finding string to end of line

General discussions about Advanced Find and Replace
Post Reply
carlospackard
Posts: 1
Joined: Tue Oct 04, 2011 5:44 pm

Regular Expression syntax for finding string to end of line

Post by carlospackard » Tue Oct 04, 2011 5:57 pm

I'm new to AFR. I've read through the documentation but I'm still confused a bit. I'm not sure on the correct syntax and a few things for both the FIND field and the REPLACE field. One of the things I'm trying to do for example is the following.

I have the following lines in my HTM document:
<p ></p>It is to be regretted the world does not discriminate more justly in its use of political terms. Governments are usually called either monarchies or republics. The former class embraces equally those institutions in which the sovereign is worshipped as a god, and those in which he performs the humble office of a manikin. In the latter we find aristocracies and democracies blended in the same generic appellation. The consequence of a generalization so wide is an utter confusion on the subject of the polity of states.<br /><br />
<p ></p>The author has endeavored to give his countrymen, in this book, a picture of the social system of one of the <i >soi-disant</i> republics of the other hemisphere. There has been no attempt to portray historical characters, only too fictitious in their graver dress, but simply to set forth the familiar operations of Venetian policy. For the justification of his likeness, after allowing for the defects of execution, he refers to the well-known work of M. Daru.<br /><br />

All the lines begin with '<p ></p>' and follow with general text. what I want to do is to find all line beginning with '<p ></p>', followed by anything until it gets to the end of the line or paragraph and then replace it with '<p >' followed by what it found in the paragraph and then place the '</p>' at the end.

I used to use a program in which the following syntax was used for this type of operation but it won't work on 64 bit. Between the first set of " is the find and between the second set of " is the replace. \r\n is equal to the end of a line or paragraph.
"{<p >}{<\/p>}{[^\r\n]+}\r\n" "{1}{3}{2}\r\n" -c

Please let me know the proper syntax for the find and the replace fields in AFR.

Thanks,
Carlos

zezaomachado
Posts: 6
Joined: Tue Jun 27, 2017 1:49 am

Re: Regular Expression syntax for finding string to end of line

Post by zezaomachado » Thu Jun 29, 2017 2:16 pm

Hi, Guy! Hope all of good to you.
Well, I'm translanting a game(Total War: RomeII Emperor Edition) to Portuguese-Br, and there are almost 4.000 *.html files with dialogues, encyclopedia...etc and etc...
And a lot(In fact the major and bigger histories) also come in the strings starting with <p> and reaching the end with </P>, of course.
They are in codes UTF-8(Without Bom) and I'm using Notepad++ to do the hard damn works.
With AFR, I'm replacing the commons repeatitive words/sentences and so on..., but only those without the need of especial characters in the results of the translation.
Because if I put those especial chars, the whole work turns a mess of incomprehensible chars on its positions and change the code of origin *.html files to ANSI code.
I posted something alike to try and find some fix viewtopic.php?f=1&t=2434 but, until now, no feedback.
Finally but most the intent! Sorry if I telling you but, with a very cheap and smaller hd, you can install a version of os of 32 bits and start from it and do the work you're eager about. Or run this version on virtual machine and do the same, I don't know but, I think it works.
AND PLEASE SEND ME THE NAME OF THE PROGRAM YOU USED TO FIND THE STRINGS YOU WANTED IN THE OS 32 BITS. ALTHOUGH I WANT ONE THAT FIND JUST THE STRING AND NOT THE WHOLE LINE OR PARAGRAPH. zezaomachado@hotmail.com

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests