Hello, i would need some help fixing my addpre sections. So im echoing lines which are always the same

!addpre release-group section

example !addpre something.something.imgset-MMM XXX

So basically i need a script which checking the release and if it found example IMGSET there it would changing section to IMGSET instead of XXX