diff --git a/lib/libnetwork.lib.in b/lib/libnetwork.lib.in
index b014be2..97f1d7b 100644
--- a/lib/libnetwork.lib.in
+++ b/lib/libnetwork.lib.in
@@ -31,9 +31,9 @@ function repository.is_reachable() {
return $?
}
-# function repository.get_pckname_from_HTML()
+# function repository.get_srpm_pckname_from_HTML()
# ... ADDME ...
-function repository.get_pckname_from_HTML() {
+function repository.get_srpm_pckname_from_HTML() {
local pck_name="$1"
local infile="$2"
@@ -48,13 +48,17 @@ function repository.get_pckname_from_HTML() {
notify.debug "$FUNCNAME: infile = \"$infile\""
+ local regexpr
+ [[ "$pck_name" =~ ^[a-zA-Z0-9-]+$ ]] && \
+ regexpr="^$pck_name-[^-]\+-[^-]\+$" || regexpr="$pck_name"
+
local pckname_from_HTML=( $(sed -n "\
- # remove HTML tags --> get a better input
- / get a better input
+ /