Support usernames with dashes
This commit is contained in:
parent
d69ad198c1
commit
fa81c73994
3
main.cpp
3
main.cpp
|
@ -9,7 +9,8 @@
|
|||
|
||||
#define DOMAIN_RE "(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}"
|
||||
// https://docs.joinmastodon.org/methods/accounts/#422-unprocessable-entity
|
||||
#define USERNAME_RE "[a-zA-Z0-9_]+"
|
||||
// https://akko.erincandescent.net/@postmaster-emeritus
|
||||
#define USERNAME_RE "[a-zA-Z0-9\\-_]+"
|
||||
#define ACCT_RE USERNAME_RE "(?:@" DOMAIN_RE ")?"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
#define DOMAIN_RE "(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,}"
|
||||
// https://docs.joinmastodon.org/methods/accounts/#422-unprocessable-entity
|
||||
#define USERNAME_RE "[a-zA-Z0-9_]+"
|
||||
// https://akko.erincandescent.net/@postmaster-emeritus
|
||||
#define USERNAME_RE "[a-zA-Z0-9\\-_]+"
|
||||
|
||||
using json = nlohmann::json;
|
||||
static time_t parse_rfc3339(const std::string& str);
|
||||
|
|
Loading…
Reference in New Issue