I’ve created a list of Find (regex) and replace (regex) for documents I need to prepare for publication. See example below.
Presently the list is in a odt document in the form of a table.
When I open a new document to be checked, I want to be able to push a button or a shortcut which uses the first string to find in my list, checks “regular expressions” pastes this first string into the “replace” slot and hits Find.
At this point I would like to check manually the various instances I need to find and replace and move on to the second string find and replace with the same behaviour.
Is there a way of doing this without manually copying and pasting from the list to the search window?
Thanks a lot!
Example of one of the search and replace strings:
In this case, I want unwanted \xA0 \t or other spaces between words or punctuation|words to be replaced by \x20 spaces.
Search:
([,|.|:|;|(|)|[|]|!|?|¿|–|–|’|‹‹|››|‘|„|»|«|"|“|”|<|—]|[[:alnum:]+])([\x9+|\xA+|\xA0+|\t+]+)([,|.|:|;|(|)|[|]|!|?|¿|-|–|’|‹‹|››|‘|„|»|«|"|“|”|<|—]|[[:alnum:]+])
Replace:
$1 $3
I am attaching the list I have so far. The FR, EN, DE, ES, IT refer to the language the search is relevant for and the searches will mostly need to be done in the order they are shown, so I would have to jump from one language to the next relevant one. Or I could also create a separate table for each language.
But, most Important, I need to be able to check what is searched before I proceed with any replacement (as you see sometimes there is an m in the replacement column, meaning that I would have to work on the text myself, for example).