"You have heard it said" is a rhetorical device used repeatedly in the sermon on the mount to refer to the old law in order to compare it with new standards:
Really? For example, can we find a cite in the "old law" where it says to "hate your enemies" as Jesus says in verse 27?
A search for "hate your enemy" finds only Matt 5:43 and Ex 23:5. Now, a great thing about
www.bible.com is that it has the passages cross-referenced. Indeed, for the Matt passage, it actually cites the source of the "love thy neighbor"
"You have heard that it was said, 'Love your neighbor [ Lev. 19:18] and hate your enemy.' "
Indeed, Lev 19 is very clear here:
" 'Do not seek revenge or bear a grudge against one of your people, but love your neighbor as yourself. "
But nowhere in the bible can we find the instruction "hate your enemy." In fact, the OT actually tells the exact opposite:
Exodus 23:5 (Whole Chapter)
If you see the donkey of someone who hates you fallen down under its load, do not leave it there; be sure you help your enemy with it.
It seems to me that Jesus's device of "you have heard it was said" is his way of going after current tradition. If it was actually in the law, then he would say, "It is written..." I think the "Hate your enemies" was something that was assumed, but not actually part of the law.
Now, "eye for an eye" is certainly in the Law of Lev and Ex (and Deut, I think)