Heello / Issues

Bug and feature tracking
1 stars 0 forks source link

provide valid "username" regexp for ping parsing #34

Closed katanacrimson closed 11 years ago

katanacrimson commented 11 years ago

As on tin; need to know what characters are valid in a username so I can turn them into auto-links within a client.

liclac commented 11 years ago

Possible alternative: Entities node in the metadata marking the ranges in the text to be linked (like how Twitter does it).

katanacrimson commented 11 years ago

even then, the valid character ranges would be helpful since we can stop someone from looking up an invalid username without API hits

katanacrimson commented 11 years ago

Appears /[a-z0-9_]/i is what we've got to work with. Anything else beyond that or any special rules like no-numerics-first, minimum length, maximum length?

caseym commented 11 years ago

/a-zA-Z\d_/

Letters, Numbers and Underscores

Maximum length 18 chars. No limits on minimum length, first character ....

katanacrimson commented 11 years ago

wfm, thanks. Might be worth tossing on the developer site somewhere though.

ed: for reference for anyone in the future: /([\w]{1,18})/i

caseym commented 11 years ago

Yeah, I'll document it in the documentation.