#!/bin/bash
s='libstuff-example1 (>= 6.3.2),
libpackage-example2 (>= 5.2.1),
libtest-example3 (>= 5.2.1)'
val=$(grep -Po 'libpackage-.* \K[0-9.]+' <<< "$s")
echo "$val"
IyEvYmluL2Jhc2gKcz0nbGlic3R1ZmYtZXhhbXBsZTEgKD49IDYuMy4yKSwKbGlicGFja2FnZS1leGFtcGxlMiAoPj0gNS4yLjEpLApsaWJ0ZXN0LWV4YW1wbGUzICg+PSA1LjIuMSknCgp2YWw9JChncmVwIC1QbyAnbGlicGFja2FnZS0uKiBcS1swLTkuXSsnICA8PDwgIiRzIikKZWNobyAiJHZhbCI=