A buck conveter looked at from the output side to the input side, ie backwards, looks just like a......... yup, a boost converter!
"regen" for a brushless motor controller is effectively free, all that the controller has to do is to put on a lower average voltage (by turning down the duty cycle of it's pulse width modulation) than the back emf that motor motor is making at that moment, and the direction of current reverses. Instead of the battery feeding current to the motor, the motor feeds current to the battery, and the inductance of the motor phase windings is what drives that current into the battery against the higher potential difference.
Most cheap motor controllers for bikes deliberately don't do regen (they either just disable the gate firing when you lift off the throttle or they never let the PWM index fall to a value below the back emf) for two reasons:
1) on low inertia, slow moving objects (like electric bikes) there really isn't much to gain from regen, it's better to just "freewheel" along at zero net torque, because regen has a loss associated with it
2) Cheap controllers tend to be poorly heat sinked and have low rated switching elements, not doing regen gives those elements a "rest" when you back off