RIP routing filter

Hi everyone. I want to filter some network to distribute. I tried to use /routing filter>. But it is not what I want or my configuration was poor.
For example: network=192.168.0.0/24, I want it filters 192.168.0.5/32, 192.168.0.128/25, 192.168.0.16/29, 192.168.0.224/28, 192.168.0.192/26 etc…

???

/routing filter
add chain=ospf-out prefix=192.168.0.0/24 prefix-length=24-32 action=discard

I tried before, but there was a very funny mistake. Thank mrz. It works now.