You can search within a selection. So, unless I misunderstand your question, just select the string within which you wish to search, Ctrl-F, enter your desired search regex and you get what you want.
Since you use the word "function", perhaps you are looking for a way to do this in a Slick-C macro? In which case you should post this question in the Slick-C macro programming forum.
Good Luck