![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Hi, y'all!
I hope you're doing well. I've come to you to seek help with the following. 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). From my inquires, I've gathered that Word wildcards will not be able to perform the requested action – although if it is not true, I'm of course open for clarification. Thus, I want to use regex via VBScript.RegExp object. I think, I have the regex pattern Code:
\b\w+\b\K\s+ 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. It seems weird, I know, and if you want I can explain why I would like a script like that in details. As always, thank you in advance for any input. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Find and Replace and add colon and space | falcios | Word | 2 | 07-28-2021 04:38 AM |
Is there a way to only find the first letter of each line? (Word 97) | Genericname1111 | Word | 4 | 09-11-2019 06:26 PM |
![]() |
cheech1981 | Word | 3 | 03-29-2017 02:33 PM |
![]() |
garcanrya | Word VBA | 2 | 01-10-2014 05:40 AM |
![]() |
gasyoun | Word VBA | 9 | 04-12-2013 04:15 PM |