【发布时间】:2019-08-27 20:55:08
【问题描述】:
我遇到了类似的问题as this question here。 \s 不匹配 VBA 中的所有空格。
但我想抓住all kinds of whitespace - spaces, tabs, newlines, thin space, hair space etc. 而不仅仅是其中一个。
除了像下面这样对每个 unicode 值进行硬编码之外,还有其他可能性吗?
With regEx
.Global = True
.Pattern = "(\s|\u2009|\u2008|.............)"
End With
How do I isolate a space using RegExp in VBA (\s vs. \p{Zs})? 想要隔离空格 - 我想要一种可读且可靠的方式来匹配任何空格,而无需按照结束问题的人的建议列出它们的 unicode 值。
【问题讨论】: