Yes black pepper in your food can help to release and relieve gas in your stomach and prevent it from coming back.
Whenever I get gas on my stomach I make sure to add some pepper to some food I'm eating and after awhile the gas buildup goes away.
Basil leaves are also known to relieve gas on your stomach as well.