[help] hi, is it possible to add full point (.) after every 4 words in a sentence/paragraph?
[help] hi, is it possible to add full point (.) after every 4 words in a sentence/paragraph using variable search replace? I searched for regex matching , didn't understand a thing as I am not from programming background. Thank you.
Posted Dec 21, 2020, 2:51 AM UTC
06
Variable Search Replace should do it.
In the search pattern,
\w+is a series of word characters, and\s+is a series of whitespace characters. In the replace string,$1refers to the matched text (i.e. a string of 4 words separated by whitespace) and adds a.to the end.No attempt is made to deal with a number of words that's not a multiple of 4, so the final 3 words don't get a
.appended.Hi u/UncleMike , Wow, you made it look so easy, with that explanation. That solved my problem. Thanks a ton. Have a good day.