diff --git a/Scripts/Bash/Cli/Functions/cli_getPathComponent.sh b/Scripts/Bash/Cli/Functions/cli_getPathComponent.sh index 6d0d078..abee102 100755 --- a/Scripts/Bash/Cli/Functions/cli_getPathComponent.sh +++ b/Scripts/Bash/Cli/Functions/cli_getPathComponent.sh @@ -186,15 +186,15 @@ function cli_getPathComponent { case "$OPTION" in '--release' ) - echo "$LOCATION" | sed -r "s!.+/${PATTERN[0]}/?!\1!" + echo "$LOCATION" | sed -r "s!.*/${PATTERN[0]}/.*!\1!" ;; '--release-major' ) - echo "$LOCATION" | sed -r "s!.+/${PATTERN[0]}/?!\2!" + echo "$LOCATION" | sed -r "s!.*/${PATTERN[0]}/.*!\2!" ;; '--release-minor' ) - echo "$LOCATION" | sed -r "s!.+/${PATTERN[0]}/?!\4!" + echo "$LOCATION" | sed -r "s!.*/${PATTERN[0]}/.*!\4!" ;; '--release-pattern' )