TheInsider
Programmer
Hello,
I am looking for the most efficient method to replace one or more white space characters within a given string with another string or character, say "_". The problem is I only want to replace spaces that aren't between double (" "
quotes.
i.e. replace the following string:
with:
I am using the vbscript regular expression library, but so far I cannot get the desired result. I have tried
and various other things, like comparing matches in a matchcollection with
, but have had no luck.
Thanks.
I am looking for the most efficient method to replace one or more white space characters within a given string with another string or character, say "_". The problem is I only want to replace spaces that aren't between double (" "
i.e. replace the following string:
Code:
star "big small " water flower "hat mouse"
Code:
star_"big small "_water_flower_"hat mouse"
Code:
Pattern = "[^""]\s+[^""]"
Code:
.Execute
Thanks.