VBScript - Regular Expression replace spaces
I have a situation where using VBScript I need to check for the presence of multiple spaces. I want to check for the presence of 2 or more consecutive spaces开发者_高级运维, so \s+ doesnt work for my needs.
Does anyone know how I can accomplish this using VBScript regular expressions.
Use brackets to specify how many repetitions to match. This matches two or more whitespace characters:
\s{2,}
If you want to match only space characters, just use a space instead of \s, or the character code:
\x20{2,}
This ought to do the trick:
\s{2,}
精彩评论