sed
solução:
Exemplo de arquivo input.txt
:
<a href="/url/version/tree/1.0.1alpha11" class="css-truncate">
<a href="/url/version2/tree1/1.0.2alpha11" class="css-truncate">
<a href="/url/version/tree/2.0stable" class="css-truncate">
sed -En 's@.*\<href="/[^[:space:]]+/([^/"[:space:]]+).*@@p' input.txt
A saída:
1.0.1alpha11
1.0.2alpha11
2.0stable