Jeremiah 29:12
11 For I know what I have planned for you,’ says the Lord. ‘I have plans to prosper you, not to harm you. I have plans to give you a future filled with hope. 12 When you call out to me and come to me in prayer, I will hear your prayers. 13 When you seek me in prayer and worship, you will find me available to you. If you seek me with all your heart and soul, 14 I will make myself available to you,’ says the Lord. ‘Then I will reverse your plight and will regather you from all the nations and all the places where I have exiled you,’ says the Lord. ‘I will bring you back to the place from which I exiled you.’
Matthew 7:7
6 Do not give what is holy to dogs or throw your pearls before pigs; otherwise they will trample them under their feet and turn around and tear you to pieces. 7 “Ask and it will be given to you; seek and you will find; knock and the door will be opened for you. 8 For everyone who asks receives, and the one who seeks finds, and to the one who knocks, the door will be opened.
Notes and References
"... The unit is held together by an inclusion (verse 7: ask ... given, and verse 11: given ... ask). It opens with an exhortation: ask ... be given, search ... find, knock ... be opened. This language is typical of speech about prayer. Compare Jeremiah 29:12-14: call ... hear; search ... find; seek ... find; Isaiah 65:1: sought ... ask ... found ... seek; b. Megillah 12b: 'he knocked at the gates of mercy and they were opened to him.' ... Just as all six sentences of the Lord's Prayer are petitions, so here prayer is understood as asking. It is assumed that disciples appear before God as 'humble receivers from a generous Father.' Is this an affirmation of the efficacy of unrestricted prayer? Or is its meaning more restricted by the context? The latter, I think, in this context. The language is typical of prayers for wisdom. Consider, for example, Proverbs 8:17 - Wisdom says: 'those who seek me diligently find me'; Wisdom of Solomon 6:12 - Wisdom 'is found by those who seek her'; James 1:5 - 'If any of you is lacking in wisdom, ask God, who gives to all generously and ungrudgingly, and it will be given you.' The language seems to say that those who ask for divine wisdom will be heard and given this treasure ..."
Talbert, Charles H. Reading the Sermon on the Mount: Character Formation and Decision Making in Matthew 5-7 (p. 134) University of South Carolina Press, 2004