Friday, 24 May 2019

windows 10 - Regex: Remove every two or more spaces between specific tags and leave just a space instead


I want to remove every two or more spaces between specific tags and leave just a space instead:


For example:


The context of articles, stories, and conversations helps you figure out and understand the meaning of English words in the text that are new to you.


My desire output:


The context of articles, stories, and conversations helps you figure out and understand the meaning of English words in the text that are new to you.


I tried something but it did not work


(?<=

)\s*|\s*(?=

)



Answer



FIND THE SOLUTION:


SEARCH:


(?s)(\G|

)((?!

).)*?\K((?<=>)\h+|\h+(?=<|\h))


REPLACE BY:


(leave empty)


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...