Thanks to Morris and Christian (karol too, but rather not have an additional package). Can't seem to find a reference to this specific behaviour on the pacman manpage, unfortunately, but it'll simplify my script. Looks like there's no way not to have the last -4 included though, but since that's version reference and quite important, I guess no way around me having to sed it out. Thanks again =)