User: Aaron -- 2013-08-25 << 1118 1120 >> |
Hits: 3894 |
Type: Regular expression replace |
Search all Regular expression replace examples |
Description: |
How to add a blank lines after every paragraph? A paragraph block in this case could be defined as follows: 1. Paragraph starts with upper case letter in first position of left justified text. 2. Paragraph ends with standard punctuation symbols (.) or (?) or (!) or (") FOLLOWED by the next upper case letter in the first position of left justified text. 3. Blank line would be inserted between each paragraph starting with an upper case letter in first position of left justified text |
Input Sample: |
Bob walked to the store on Saturday morning because he needed to buy a jug of milk. "I should have done this last night." It started to snow and he shivered. He had forgot to wear his winter coat. |
Output Sample: |
Bob walked to the store on Saturday morning because he needed to buy a jug of milk. "I should have done this last night." It started to snow and he shivered. He had forgot to wear his winter coat. |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open text file 2. ctrl-h open 'replace' dialogue * set 'search for pattern' to: * set 'replace with pattern' to: 3. click 'replace', done. 4. ctrl-s save file. |
Screenshot 1: Replace_Window |
Similar Examples: |
How to add a blank line after every 8 lines in text file? (61%) How to add a <hr> at the end of each paragraph? (60%) How to insert a blank line after each group of lines with same month? (57%) How to exchange the 1st and 2nd lines in each paragraph? (54%) How to add a space after the 15 character of each line? (54%) How to insert lines between sentences with specified order? (53%) How to insert a blank line after every 5 lines in a text file? (53%) How to remove all blank lines and lines that started with Name: or Addr:? (53%) |
Check Demo of Regular expression replace |
Keywords: |
last sentence block punctuation unctuation upper case letter starting with starting position symbols upper lines starts replace after every letter replace letter with paragraph search in each line by position add blank line after every line paragraph defined replace line starts first letter to upper case |