title: Extracting words from a string in postgres SQL
body: <p>I am brand new to 'postgres' and trying to extract a value from a string. I'm trying to use a combination of <code>regexp_substr</code> and <code>replace</code> to implement the desired outcome.</p>
  
  <p>UPDATED Example: I have a string <code>"When Harry met Sally"</code> (following the pattern, <code>When X met Y</code>).  I'd like to extract the word <code>Harry</code>, which is X.</p>
  
  <p>I am trying the syntax: 
  <code>regexp_substr(REPLACE('When Harry met Sally', 'When ', ''),' met [^.]*');</code> but am receiving the error message: <code>ERROR: function regexp_substr(text, unknown) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts.</code></p>
  
  <p>Can anyone help? I imagine that this is child's play for some pro out there.</p>