How to align some vertices group by polygon/edge and axis? How to align some vertices group by polygon/edge and asix ?

It may solve by boolean operation. 
Or using snapping to grid, because snap to grid works such as intersection with align axis. But another snapping tool doesn't work like that. 

Simple example:
This is a standard Boolean operator task: