comparison pidgin-twitter.h @ 336:8de140bc8d13

better handling of non-ascii tag. now it properly handles tags in which the first ascii latter occurs in the beginning or mid of a non-ascii word.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 14 Oct 2009 14:55:55 +0900
parents dff611cb9f7b
children cdcfdf6a15fb
comparison
equal deleted inserted replaced
335:34ecd09ce4f8 336:8de140bc8d13
184 #define P_SENDER_FFEED "^(\\r?\\n?)\\s*@[0-9]\\s*([-A-Za-z0-9_]+)\\s*" 184 #define P_SENDER_FFEED "^(\\r?\\n?)\\s*@[0-9]\\s*([-A-Za-z0-9_]+)\\s*"
185 #define P_COMMAND "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+)(?:\\s*\\Z)" 185 #define P_COMMAND "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+)(?:\\s*\\Z)"
186 #define P_PSEUDO "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)" 186 #define P_PSEUDO "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)"
187 #define P_USER "^.*?(?:<a .+?>)?([-A-Za-z0-9_]+)(?:</a>)?:" 187 #define P_USER "^.*?(?:<a .+?>)?([-A-Za-z0-9_]+)(?:</a>)?:"
188 #define P_CHANNEL "^(.*?(?:<a .+?>)?[-A-Za-z0-9_]+(?:</a>)?: \\r?\\n?#)([A-Za-z0-9_]+) " 188 #define P_CHANNEL "^(.*?(?:<a .+?>)?[-A-Za-z0-9_]+(?:</a>)?: \\r?\\n?#)([A-Za-z0-9_]+) "
189 #define P_TAG_TWITTER "(^|\\s+)#([-A-Za-z0-9_]+|\\S+_)" 189 #define P_TAG_TWITTER "(^|\\s+)#([^-A-Za-z0-9_]*[-A-Za-z0-9_]+\\S*)"
190 #define P_TAG_IDENTICA "#([-A-Za-z0-9_]+)" 190 #define P_TAG_IDENTICA "#([-A-Za-z0-9_]+)"
191 #define P_GROUP_IDENTICA "!([-A-Za-z0-9_]+)" 191 #define P_GROUP_IDENTICA "!([-A-Za-z0-9_]+)"
192 #define P_IMAGE_TWITTER "<profile_image_url>(https?://.+?)</profile_image_url>" 192 #define P_IMAGE_TWITTER "<profile_image_url>(https?://.+?)</profile_image_url>"
193 #define P_IMAGE_WASSR "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>" 193 #define P_IMAGE_WASSR "<div class=\"image\"><a href=\".+\"><img src=\"(.+)\" width=\".+?\" /></a></div>"
194 #define P_IMAGE_IDENTICA "<img src=\"(https?://.+.identi.ca/.+)\" class=\"photo avatar\"" 194 #define P_IMAGE_IDENTICA "<img src=\"(https?://.+.identi.ca/.+)\" class=\"photo avatar\""