How to get the string before the character hyphen? The following code gets the string after the hyphen. How can I reverse this?
set string=1.0.10-SNAPSHOT
echo %string:*-=%
SNAPSHOT
But I want the 1.0.10 instead of SNAPSHOT of if the string is RELEASE