Numbers 31, verses 17 and 18 specifically, is the example I gave The Israelites initially only captured the women and children of the Midianites. But Moses gets angry at the army officers. "I specifically told you to kill them ALL." Moses then instructs them to keep the virgin women for themselves.