Mercurial > pidgin-twitter
comparison pidgin-twitter.h @ 224:1fcd0e589b9e
revised the recipient pattern. new pattern can handle:
- recipient name surrounded by non ascii characters without any space.
- recipient name accidentally escaped with '.' such as ".@foo".
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 06 Sep 2008 23:47:17 +0900 |
parents | c3efae72f72a |
children | 1ef5aa4883a1 |
comparison
equal
deleted
inserted
replaced
223:c3efae72f72a | 224:1fcd0e589b9e |
---|---|
145 #define DEFAULT_LIST "(list of users: separated with ' ,:;')" | 145 #define DEFAULT_LIST "(list of users: separated with ' ,:;')" |
146 #define OOPS_MESSAGE "<body>Oops! Your update was over 140 characters. We sent the short version to your friends (they can view the entire update on the web).<BR></body>" | 146 #define OOPS_MESSAGE "<body>Oops! Your update was over 140 characters. We sent the short version to your friends (they can view the entire update on the web).<BR></body>" |
147 #define EMPTY "" | 147 #define EMPTY "" |
148 | 148 |
149 /* patterns */ | 149 /* patterns */ |
150 #define P_RECIPIENT "(^|\\s+)@([A-Za-z0-9_]+)" | 150 #define P_RECIPIENT "(^|\\s+|[.[:^print:]])@([A-Za-z0-9_]+)" |
151 #define P_SENDER "^(\\r?\\n?)\\s*([A-Za-z0-9_]+)(?:\\s*\\(.+\\))?: " | 151 #define P_SENDER "^(\\r?\\n?)\\s*([A-Za-z0-9_]+)(?:\\s*\\(.+\\))?: " |
152 #define P_COMMAND "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+)(?:\\s*\\Z)" | 152 #define P_COMMAND "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+)(?:\\s*\\Z)" |
153 #define P_PSEUDO "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)" | 153 #define P_PSEUDO "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)" |
154 #define P_USER "^\\(.+?\\)\\s*([A-Za-z0-9_]+):" | 154 #define P_USER "^\\(.+?\\)\\s*([A-Za-z0-9_]+):" |
155 #define P_USER_FIRST_LINE "^\\(.+?\\)\\s*.+:\\s*([A-Za-z0-9_]+):" | 155 #define P_USER_FIRST_LINE "^\\(.+?\\)\\s*.+:\\s*([A-Za-z0-9_]+):" |