Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I like the new @username feature of comments. However, what syntax do I use when the username has spaces (or perhaps other weird characters) in it?

share|improve this question
possible duplicate of How do comment @replies work? – Jon Seigel Jun 18 '11 at 15:17
up vote 8 down vote accepted

Based on a comment in the blog post, I implemented a way to handle this. The situation:

  1. Spaces are not used for matching user displaynames.

  2. The user displayname match must be 3 characters minimum, so @a and @ab will never match, but @abc will.

This is fine most of the time, but it is problematic for users with both spaces in their names and either very short or very common first names like "Al Smith".

Now, spaces are removed from the display name for the purpose of matching. If you need to refer to "Al Smith" then @als will work -- or @alsmith.

(Matches are done in reverse chronological order so you only need the minimum 3 characters necessary to match the displayname of the most recent comment under yours -- the matching process stops as soon as a match is made.)

share|improve this answer
@JeffAtwood Better solution. Thanks for changing. Now some link action on the @username could help to see, if it worked. – Jan P. Jan 18 '10 at 6:55
@jan I considered that, and "it worked!" feedback would be nice, but comments are busy enough without adding more hyperlinks..… – Jeff Atwood Jan 18 '10 at 7:10
ITYM "above" yours, not under, unless you've got your browser rendering text in bottom-to-top order or something ... – SamB Apr 7 '10 at 23:41

I just saw in What is the relevance of “ @ ” in comments? this info:

  1. Spaces cannot be used to match, so if the person's display name is "Peter Smith" then just use @peter to match.
  2. Matching is performed in reverse chronological order, so if there are five people named "John" in the comments, writing "hey @john, have you considered apples?" will match the most recent John to comment.

I guess the answer is "you can" and it "mostly works the way you want it to anyway" and that's good enough for me!

share|improve this answer

You must log in to answer this question.

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