"The Lord saw how great the wickedness of the human race had become on the earth, and that every inclination of the thoughts of the human heart was only evil all the time. The Lord regretted that he had made human beings on the earth, and his heart was deeply troubled. So the Lord said, 'I will wipe from the face of the earth the human race I have created—and with them the animals, the birds and the creatures that move along the ground—for I regret that I have made them.' But Noah found favor in the eyes of the Lord." (Genesis 6:5-8)
For us, the idea of regretting is usually something like this: we do something, experience some negative consequence, and then regret our original decision. In essence, we change our mind about what we first did. But God doesn't really work like that: "God is not human...that he should change his mind." (Num. 23:19). Instead, for God it's closer to the idea of grieving or being really sad.. It also carries the sense of "to change to a different course of action", sometimes translated "relent" (see Bible passages below).
Here's one of the best and clearest explanations that I found on the passage. It's from The Apologists Study Bible: "Although 'regret' is the customary translation of the Hebrew verb in verse 6, its basic meaning is to 'be pained'. This is the sense here, as suggested by the parallel “be grieved.” As it hurts a loving parent to see the disobedience of his children, so it pained God to see how wicked men had become. Human regret arises from one’s inability to foresee or alter the effects of one’s actions. But because of God’s perfect knowledge and unlimited power He is not subject to these human limitations. The correspondence between human emotions and the heart of God provides insight into the mystery of God’s nature. Although the Bible describes God as responding with human emotions, the correspondence is not exact. People often act out of sinful, irrational, or uncontrolled emotion, but God’s emotion is always consistent with His righteous character and eternal purposes (cp. 2 Th 2:13). A close reading of the passage shows that God’s disappointment was not with human creation but with human sin. God is not indifferent to sin’s effects, but His grief is not a feeling of helplessness. Coupled with His pained heart is the just recompense of His anger (cp. Ps. 78:40–41; Is 63:10)."
Here are a few other passages that use the same or a similar word:
- “I [God] regret that I have made Saul king, because he has turned away from me and has not carried out my instructions." (1 Sam. 15:11) This is a very similar situation. God grieved the sin of King Saul and the damage that it did to the Israelites.
- "Then the LORD relented and did not bring on his people the disaster he had threatened." (Exod. 32:14, this was while Moses was up on Mt. Sinai receiving the 10 Commandments)
- "When God saw what they [the Ninevites] did and how they turned from their evil ways, he relented and did not bring on them the destruction he had threatened. (Jonah 3:10).
- "Do not grieve the Holy Spirit of God, with whom you were sealed for the day of redemption." (Eph. 4:30)
CONCLUSION: Sin always breaks God's heart, and sometimes the extent of the sin is so great, God is filled with anguish and remorse. Human sin is God's sorrow.