actually even with regex powerfull enough, grep shouldn't work
because to recognize the words you need to rely on the common part that is in the sides
but that is still part of the regex so it will be printed together with the word
grep is a finder not an editor, so is in the wrong category of programs for this
sed is an editor, and for this will be enough
it can also do the work of grep putting it on quiet with -n and printing only when there is a match with the p option in s program
cat file |sed -n 's/.*sourceid=\([^&]*\).*/\1/p'
so it's working even if there are mixed lines, if you have more rules for different kind of lines you can add them on sed
cat file |sed -n 's/.*sourceid=\([^&]*\).*/\1/p;s/side-left-match\(word-match\)side-right-match/\1/p'
for information on sed and regexp