'bash get first element before the first integer of a variable
I want to get the first element before the first integer of a variable, For example, I have this variable:
FILE=normalize-component-0.0.3-SNAPSHOT-jar-with-dependencies-package-58.jar
And I want to get the application name which is the name "normalize-component" in that case that always comes before an integer.
Take in mind that the application name can always change but the structure will always be:
{application_name}-{digit}-{*}-jar-with-dependencies-package-{digit}.jar
desired output:
APP_NAME=normalize-component
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
