title: How do I isolate a space using RegExp in VBA (\s vs. \p{Zs})?
body: <p><strong>Introduction/Question:</strong></p>
  
  <p>I have been studying the use of Regular Expressions (using VBA/Excel), and so far I cannot understand how I would isolate a <code>&lt;space&gt;</code> (or <code>" "</code>) using regexp from other white space characters that are included in <code>\s</code>.  I thought that I would be able to use <code>\p{Zs}</code>, but in my testing so far, it has not worked out.  Could someone please correct my misunderstanding?  I appreciate any helpful input.</p>
  
  <p><strong>To offer proper credit</strong>, I modified some code that started off as a very helpful post by @Portland Runner that is found here: <a href="https://stackoverflow.com/questions/22542834/how-to-use-regular-expressions-regex-in-microsoft-excel-both-in-cell-and-loops">How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops</a></p>
  
  <p><strong>This has been my approach/study so far:</strong></p>
  
  <p>Using the string <code>"14z-16z Flavored Peanuts"</code>, I've been trying to write a RegExp which removes <code>"14z-16z "</code> and leaves only <code>"Flavored Peanuts"</code>. I initially used <code>^[0-9](\S)+</code> as strPattern and a sub procedure with following snippets:</p>
  
  <pre><code>Sub REGEXP_TEST_SPACE()
  
  Dim strPattern As String
  Dim strReplace As String
  Dim strInput As String
  Dim regEx As New RegExp
  
  strInput = "14z-16z Flavored Peanuts"
  strPattern = "^[0-9](\S)+"
  strReplace = ""
  
  With regEx
      .Global = True
      .MultiLine = True
      .IgnoreCase = True
      .pattern = strPattern
  End With
  
  If regEx.Test(strInput) Then
      Range("A1").Value = regEx.Replace(strInput, strReplace)
  End If
  
  End Sub
  </code></pre>
  
  <p>This approach gave me an A1 value of <code>" Flavored Peanuts"</code> <em>(note the leading <code>&lt;space&gt;</code> in that string)</em>.</p>
  
  <p>I then changed <code>strPattern = "^[0-9](\S)+(\s)"</code> (added the <code>(\s)</code>), which gave me the desired A1 value of <code>"Flavored Peanuts"</code>.  Great!!!  I got the desired output!</p>
  
  <p>But as I understand it, <code>\s</code> represents all white-space characters, equal to <code>[ \f\n\r\t\v]</code>.  In this case, I know that the character is just a normal, single space -- I don't need carriage return, horizontal tab, etc.  So I tried to see if I could just isolate the <code>&lt;space&gt;</code> character in regex (unicode separator: space), which I believe is <code>\p{Zs}</code> (e.g., <code>strPattern = "^[0-9](\S)+(\p{Zs})"</code>).  Using this pattern, however, doesn't return a match whatsoever, nevermind removing the leading space.  I also tried the more general <code>\p{Z}</code> (all unicode separators), but that didn't work either.</p>
  
  <p>Clearly I have missed something in my study.  Help is both desired and appreciated.  Thank you.</p>