I do not think it is possible to achive this in plain bech32, you need to convert it to hex and than back to bech32 to get retrieve the bech32 stake address.
First you decode the bech32 shelley address
For example converting the address
Now, the Stake part of the address is the last 56 bytes of it, which gives us
Converting this to a bech32, we will retrieve the associated stake key
Just a reminder that the address can be mangled, so the owner of the stake rights might not be the same person as the owner of the payment funds.