Contents of the ManualInstallation The Interface General Find Hyphens Find Warning Find List Headers Work with style Edit Regex Dialog RegEx RegEx: 1° Eexample RegEx: 2° Eexample RegEx: 3° Eexample RegEx: 4° Eexample RegEx: 5° Eexample RegEx: 6° Eexample Copy RegEx Paste RegEx Options Language Debug Info
Link Utili Libre Office Open Office

RegEx: 3° Eexample

We create a RegEx 'Line Modifier'

Tell me, do not leave me in suspense.


The examples in this guide have been performed on a test document can be downloaded here.

The third example will involve the creation of a new RegEx that will combine two paragraphs. This RegEx is already present in Pepito Cleaner and then write a copy as an example. It is a case reported by Giannisem on the forum of Simplicissimus, namely a dialogue that begins in a paragraph but ends in the next. For example:

«Is it possible that I can never to end a dialogue in the same paragraph?

I do not say by chance» said the boy one.

To understand how to act in these cases before the extension will show you how to fill in the blanks in the window of the new RegEx (if you do not remember how to create a new re-read the 1st RegEx example of this manual).


LibreOffice - Ubuntu

OpenOffice - Windows

In the window that is used to create a new RegEx edit the fields as follows:

Key
This field takes a value valid random. They just do not worry about them and go over.
Visible
Selected 'Visible' since the RegEx must be 'activated' and visible in the section 'General Find'.
Text
Write in the text field that will identify the RegEx in the 'General Find'. For example, I wrote "Tell me, do not leave me in suspense.".
Find
Here goes the RegEx itself. In this case it will be '^([^«]+»)'.
RegEx
Selezionate 'Yes' in this field because the field 'Find' is a RegEx, not a simple text.
Case Sens.
Selected 'No' in this field because we do not care to differentiate between uppercase and lowercase.
Dual Choise
Select 'Single' in this field since the AutoCorrect proposal is unique.
Label_1
Write in this field the text displayed as information of Autocorrect. For example, i wrote "Merge Up".
Mode_1
Selected 'Line Modifier' because the RegEx that we will create will speak on the wrapping of paragraphs.
Replace_1
Here goes the text that will replace what we find. In this case, this field will be ' $1' (precisely 'space$1').
Direction_1
Set the value to 'Left' so that it knows the extent of having to move to the left after finding the RegEx.
Selection_1
Set the value of this field to '1'. This value represents how many characters will add to the selection PepitoCleaner.

Then click on 'OK' to change the RegEx. From this moment the RegEx change will be visible in the 'General Find'. To make the final editing of this RegEx you need to click on the correct icon (the one furthest to the right in the lower section of the 'Edit RegEx') to save her.

Now we go down a bit in the operation to try to figure it out. Pepito Cleaner, in RegEx 'Line Modifier', it behaves as follows:

Find RegEx
In the specific case and using the example above, after the search, Pepito Cleaner will as below:
«Is it possible that I can never to end a dialogue in the same paragraph?
I do not say by chance» said the boy one.
Save the new text
In the specific case and using the above example 'I do not say by chance»' becomes ' I do not say by chance»' with a space in front. Note that the text is not replaced but still only stored.
Move the cursor and adds to the selection
In the specific case and using the example above Pepito Cleaner adding '1' character to the left ('Left') will also select the 'carriage return' (end of paragraph) and You will find as follows:
«Is it possible that I can never to end a dialogue in the same paragraph?
I do not say by chance» said the boy one.
Replaces the selected text with the one stored
In the specific case and using the example above Pepito Cleaner replaces the selected text with the one stored in the phase 'Save the new text' above also removing the 'carriage return' that was added to the selection. Then the final text will be:
«Is it possible that I can never to end a dialogue in the same paragraph? I do not say by chance» said the boy one.

If you are trying to document Errors.odt created specifically for examples of tests you can do in the 'General Find' to see how Pepito Cleaner is able to solve various dialogues mezzanine following the your instructions.


Next page