Voltage Regulators
Linear voltage regulators are actually pretty bad at removing ripple. Ripple on the input will pass through and find its way onto the output. How much will depend on the regulator and the load, but in geneal high load = more ripple passing through.
Removing Ripple
Using a RC filter and transistor or mosfet is an excellent way of removing ripple. Its called a capacitance multiplier and there's an excellent video on it at https://www.eevblog.com/2018/08/28/eevblog-1116-the-capacitance-multiplier/