How to use bash regex inside Makefile Target
问题 In a bash script, the following regex appears to work well: MY_STRING="FirstName-LastName-Gender-Age" MY_REGEX="([^-]+)-([^-]+)$" if [[ $MY_STRING =~ $MY_REGEX ]]; then echo "Match: $BASH_REMATCH" fi I'm interested in using this script inside the Makefile. It appears to have syntax issues. For example: my-target: MY_STRING="FirstName-LastName-Gender-Age" MY_REGEX="([^-]+)-([^-]+)$" if [[ $MY_STRING =~ $MY_REGEX ]]; then echo "Match: $BASH_REMATCH" fi What would be the correct syntax for this