User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
public:nnels:etext:regex [2017/10/01 16:56]
sabina.iseli-otto Page moved from public:nnels:public:nnels:etext:regex to public:nnels:etext:regex
public:nnels:etext:regex [2017/11/02 18:46]
farrah.little
Line 74: Line 74:
  
 In LibreOffice, replace all ''\n'' with ''\p'' to convert them to paragraphs. In LibreOffice, replace all ''\n'' with ''\p'' to convert them to paragraphs.
 +
  
 ---- ----
  
-<note important>If you understand the deleted notes below, please attach a screenshot of the problem and of the solution!</note> 
- 
-<del>Check to see if there is a paragraph marker at the end of each line, if so, there is a multi-step process to clean them up: 
-    - Paragraphs will be separated by a blank line. replace those with a unique set of characters that won't be in the text, e.g. ''\p\p'' -> ''%%%%'' 
-    - If the lines all end with a space, replace all ''\p'' with nothing, otherwise replace them with a single space. 
-    - Finally, replace all ''%%%%'' with ''\p''. 
-  * If the lines wrap properly but there is still a blank line between paragraphs, then a simple replace ''\p\p'' with ''\p'' will suffice, rather than the above procedure.</del> 
- 
-<del>We have to convert the double paragraphs breaks into something else unique, remove the single paragraph breaks and then convert the unique characters that were double paragraph breaks into new single paragraph breaks. It is best to do this at the beginning of the text correction stage as it appears to mess with existing formatting styles. 
-  -  Find and replace all double paragraphs 
-    * initiate a find for, ^p^p 
-  - Replace with a unique symbol or code, eg, ' xswedc ' 
-    * (I found placing a space before and after helps make it even more unique and avoid it bunching up with other double paragraphs) this isn't anything special about these letters, other than that they are a unique string of letters we can search on later 
-  - Find and replace all remaining single paragraphs, find = ^p, replace =  [single keyboard space] 
-  - Find and replace all the double paragraphs you previously changed into a special symbol or code and change back to a single paragraph 
-  - Find and remove all line breaks, change into double or single paragraphs instead (find = ^m, replace = ^p )</del> 
- 
----- 
  
 **PROBLEM**: Running headers. Example, where the first three numbers and the three numbers after the filename is the page number:  **PROBLEM**: Running headers. Example, where the first three numbers and the three numbers after the filename is the page number: 
Line 130: Line 113:
   * ''[^\."?!]$''   * ''[^\."?!]$''
  
----- 
public/nnels/etext/regex.txt · Last modified: 2024/05/29 20:30 by rachel.osolen