I have a question regarding parameter expansion in Groovy. I have a variable called : ${My_Version}
now I have seen that you can only use the first 4 digits of the variable with the following possibilities : ${My_Version[0..4]}
.
Now I have the following problem I would like to use a Regex parameter to filter out software versions like 10.0.0. The corresponding Regex parameter is : ^(\d+.)?(\d+.)?(*|\d+)[;]
How can I use this Regex parameter from this variable. Thank you for your help.
I've been thinking about something like : ${My_Version[^(\d+\.)?(\d+\.)?(\*|\d+)[;]]}