Even if you solve yourself, it is customary to supply the solution so others may benefit
I would add that there would be no reason to use grep at all if using awk and that if you simply include that there could be a number you would not get the modules output:
Code:
rpm -qa | awk -F- '/jboss[0-9]/{print $3}'
Above is untested but you should get the idea.