View Single Post
 
Old 05-28-2022, 04:00 PM
macropod's Avatar
macropod macropod is offline Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Bachelar View Post
I would like to use regex to find space after one- or two-letter words at the of every line – any line ending not only with paragraph mark or manual line-break – and replace that space (and only space, words should remain unchanged).
...
To conclude, I don't know how to put together a script to search and replace with regex and I'm not sure if it's possible to get the space after one- or two-letter words at the end of every line.
To begin with, Word does not work with lines - it works with paragraphs, etc. That said, for a workaround see:
https://www.msofficeforums.com/word-...cter-line.html

Moreover, it's far from apparent what you want to do with those spaces once you've found them.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote