You can do something like:
SELECT *
FROM USER_SOURCE
WHERE type='PACKAGE'
AND NAME='PACKAGE_NAME'
ORDER BY type, name, line;
There are many options you can do, but check out the USER_SOURCE table
So if you want to search ALL code for a String, then I would do:
SELECT *
FROM USER_SOURCE
WHERE UPPER(text) LIKE UPPER('%what I am searching for%')
ORDER BY type, name, line
Update from comments
I got some good comments (if I could +1 you I would). I was providing a search for only your files. If you want to search ALL code, then use:
SELECT *
FROM ALL_SOURCE
WHERE UPPER(text) LIKE UPPER('%what I am searching for%')
ORDER BY type, name, line