Regular Expression syntax for finding string to end of line
Posted: 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
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