# How to search for a comment left by a particular user on my post?

What is the efficient way to search for a comment left by a particular user on my post? I can go back into my activity/comments in my profile page and dig it up. But this comment was left by a user almost a year back and it is highly unlikely I can look it up manually using a brute force search technique. (I know the username of the user who left the comment on a specific answer of mine. I don't remember the exact post, which I answered.)

• You'll have to work it out anyhow. See replies in your profile either, but they'll be probably more than the answers.
– ABC
May 9 '13 at 7:40

The data.SE query Comments left by a user on your posts does this. It takes two parameters:

• your UserId, e.g., $17762$; this parameter is pre-filled if you are logged in to Data Explorer site
• Commenter's UserId, also numeric, not a display name.
– user17762
May 9 '13 at 15:41
• @user17762 Yes, by me. May 9 '13 at 15:44
• Cool. Thanks. ${}$
– user17762
May 9 '13 at 15:50
• I see that you have written lot of wonderful queries. Could you let me know how you wrote these queries and where can I learn on how to write such queries? Thanks.
– user17762
May 12 '13 at 20:52
• @user17762 In case you want to learn SQL systematically, I think that w3schools tutorial on SQL is nice (although SO people seem to dislike w3schools in general). It takes a little while to learn to ignore the ads surrounding the text, but the text itself is clearly written and the interactive examples are helpful. ¶ Another route (which I take most of the time) is to search for queries that do things similar to what you want to do, decipher the logic and modify them to your taste. May 12 '13 at 21:29

You know that you want to find a post, where your username and that other user both occur. (You posted an answer and he posted a comment.) So you can try to Google for both usernames. If you're lucky, there won't be too many posts. For example, if the two users were me and Arturo Magidin, I would search for "Martin Sleziak" "Arturo Magidin" site:math.stackexchange.com.
If you know about some phrase that occurred in that post, that might help you to refine the search query.

A different solution could be download all your responses, for example download all pages like http://math.stackexchange.com/users/8297/martin-sleziak?tab=responses&page=1 http://math.stackexchange.com/users/8297/martin-sleziak?tab=responses&page=100 (Of course, you have to use your the page with your userID and your username, this is just an example. You will find the tab with responses on your profile page) Or you can download the comments of that particular user, if you think you have better chance of finding that comment in those.

This can be done automatically, using Wget or some similar program.

Once you have all responses on your hard drive, you can search the files for the particular username there. (For example, in Total Commander you would use Alt+F7 and enter the username into "Find text".) I have no doubt that your favorite filemanager has a similar function.