Some gardeners say it does, some disagree ! also, reputed to work for Broccoli
One of those questions that is hard to get a definitive answer for. As soon as someone says they planted Oregano and had no Butterfly problems someone else says they planted Oregano and the Butterflies laid their eggs next to it.
No harm in giving it a try - let us know how it goes.
Good Luck - Hammer