Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Find/replace:
- End of sentence: `.`, `?`, `!`
- 1. `. ` by `.` (xInf)
- 2. `.` by `. `
- 3. ` .` by `.` (xInf)
- Mid sentence: `,`, `;`
- 1. `, ` by `,` (xInf)
- 2. `,` by `, `
- 3. ` ,` by `,` (xInf)
- Parentheses:
- 1. `( ` by `(` (xInf)
- 2. ` )` by `)` (xInf)
- 3. `) ` by `)` (xInf)
- 4. `)` by `) `
- 5. `) .` by `).` (Also ?, !)
- 6. `) ,` by `),` (Also ;)
- 6. ` (` by `(` (xInf) // `. (` needs to be handled better?
- 7. `(` by ` (`
- 8. `.) ` by `.) ` (Also ?, !)
- Quotes:
- // `"` is not good since it matches both opening and closing quotes.
- // hex 2018 = dec 8216 is opening single quote
- // hex 2019 = dec 8217 is closing single quote
- // hex 201C = dec 8220 is opening double quote
- // hex 201D = dec 8221 is closing double quote
- // hex 0022 = dec 34 is non-smart quote.
- 1. `^u34` by `"`
- 2. ` ^u8217` by `'` (xInf)
- 3. ` ^u8221` by `"` (xInf) // Problem if multiple spaces: closing replaced by opening.
- 4. `^u8216 ` by `'` (xInf)
- 5. `^u8220 ` by `"` (xInf)
- 6. `.^u8221` by `." ` (Also ?, !)
- 7. `,^u8221` by `," ` (Also ;)
- Paragraph breaks:
- 1. ` ^p` by `^p` (xInf)
- ==========
- Yet to address:
- - Quotes and interaction with fullstops
- - Ellipsis
- - Abbreviations e.g. M.L.A.
Advertisement
Add Comment
Please, Sign In to add comment