title: Difference between \s and [:space:] in REGEXP_SUBSTR
body: <p>I try to extract the non-white space character from a string using REGEXP_SUBSTR. </p>
  
  <p>I use this regex  <code>\s*([^\s]*)\s*</code> and extract the first group</p>
  
  <p>Using <code>\s</code> to denote white spaces as documented
  <a href="http://docs.oracle.com/database/121/SQLRF/ap_posix003.htm#SQLRF55544" rel="nofollow">here</a> removes the leading spaces, but preserves the training once.</p>
  
  <pre><code> select  '"'||REGEXP_SUBSTR( ' xxx  ', '\s*([^\s]*)\s*', 1, 1, NULL, 1 )||'"' AS text
   from dual;
  
   "xxx  "
  </code></pre>
  
  <p>Only if I switch to the POSIX syntax as documented for <a href="https://docs.oracle.com/cd/B12037_01/server.101/b10759/ap_posix001.htm" rel="nofollow">10g</a> I get the expected result.</p>
  
  <pre><code> select  '"'||REGEXP_SUBSTR( ' xxx  ', '\s*([^[:space:]]*)[:space:]*', 1, 1, NULL, 1 )||'"' AS text
   from dual;
  
   "xxx"
  </code></pre>
  
  <p>What's (I'm doing) wrong?</p>
  
  <p>I'm on 12.1.0.2.0</p>
  
  <p>NLS_CHARACTERSET    WE8MSWIN1252</p>