title: How to use bash regex inside Makefile Target
body: <p>In a bash script, the following regex appears to work well:</p>
  
  <pre><code>MY_STRING="FirstName-LastName-Gender-Age"
  MY_REGEX="([^-]+)-([^-]+)$"
  if [[ $MY_STRING =~ $MY_REGEX ]]; then
      echo "Match: $BASH_REMATCH"
  fi
  </code></pre>
  
  <p>I'm interested in using this script inside the Makefile. It appears to have syntax issues. For example:</p>
  
  <pre><code>my-target:
      MY_STRING="FirstName-LastName-Gender-Age"
      MY_REGEX="([^-]+)-([^-]+)$"
      if [[ $MY_STRING =~ $MY_REGEX ]]; then
          echo "Match: $BASH_REMATCH"
      fi
  </code></pre>
  
  <p>What would be the correct syntax for this in make? The above appears to have issues with variable assignment, issues with the "$" in the regex, etc.</p>