7

Is there a way to search for text within a specific user's answers? I can approximate this with google using the site:stackoverflow.com, but this will include text from any answers to questions that the user also answered.

2
  • 2
    stackoverflow.com/help/searching
    – Servy
    Commented Feb 5, 2015 at 17:50
  • 5
    user:userId is:answer where userId is the id number of the user. You can find the id number in the user's profile link. It's the number between "/users/" and "/displayname".
    – Kendra
    Commented Feb 5, 2015 at 17:51

2 Answers 2

11

Not sure if this is what you are looking for, but, for example, if I know I've given a stellar (of course) answer on something I use "search text userid:myuserid"

enter image description here

As Kendra pointed out in a comment, adding the "is:answer" filter will confine the search to your answers.

And the Search Documentation that Servy linked to in a comment will be very helpful to you.

6
  • 3
    Considering the OP wants to search answers only, you'd also want the "is:answer" condition in there.
    – Kendra
    Commented Feb 5, 2015 at 17:53
  • 1
    @kendra yes, thanks. I usually find what I need without that fairly quickly but it's a good idea.
    – codeMagic
    Commented Feb 5, 2015 at 17:54
  • 1
    It's a great idea, especially if you're searching a profile with lots of both questions and answers. :) If the profile doesn't have a lot of either, such as mine, then it's really not necessary.
    – Kendra
    Commented Feb 5, 2015 at 17:55
  • 4
    Also, if you can't remember your own user ID, "user:me" will search all of your own posts.
    – Brad Larson Mod
    Commented Feb 5, 2015 at 18:08
  • 1
    Or if you can't remember user:me, if you go to your own profile, the search string user:xxxxx will already appear in the search box, so you just need to add the other parameters you want to look at Commented Feb 5, 2015 at 19:18
  • All good points. I usually just right click on my username on the right and open in a new tab
    – codeMagic
    Commented Feb 5, 2015 at 20:30
5

If the built in search functionality does not suit your needs, and you need something more powerful, you can use the Stack Exchange Data Exporter.

Take this query for example:

select p.Id [Post Link]
from Posts p
where 
  p.OwnerUserId = ##UserID## and
  (p.Body like '%##SearchQuery##%' or p.Title like '%##SearchQuery##%')

Enter your UserId and a search query and you are on your way. If you know Sql you can expand on this for more advanced queries.

Note: this data is refreshed every week. It is not real-time data.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .